Method: Roby::Application#cleanup

Defined in:
lib/roby/app.rb

#cleanupObject

The inverse of #setup. It gets called at the end of #run



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'lib/roby/app.rb', line 1152

def cleanup
    # Run the cleanup handlers first, we want the plugins to still be
    # active
    cleanup_handlers.each(&:call)

    cleanup_user_lifecycle_hooks(init_handlers)
    cleanup_user_lifecycle_hooks(setup_handlers)
    cleanup_user_lifecycle_hooks(require_handlers)
    cleanup_user_lifecycle_hooks(controllers)
    cleanup_user_lifecycle_hooks(action_handlers)
    cleanup_user_lifecycle_hooks(cleanup_handlers)

    call_plugins(:cleanup, self)
    # Deprecated version of #cleanup
    call_plugins(:reset, self, deprecated: "define 'cleanup' instead")

    planners.clear
    plan.execution_engine.gather_propagation do
        plan.clear
    end
    clear_models
    clear_config

    stop_shell_interface
    base_cleanup
end