lib/foreman_tasks/dynflow/persistence.rb in foreman-tasks-0.7.1 vs lib/foreman_tasks/dynflow/persistence.rb in foreman-tasks-0.7.2
- old
+ new
@@ -11,12 +11,10 @@
clear_connections = ActiveRecord::Base.connection.open_transactions == 0
super.tap do
begin
on_execution_plan_save(execution_plan_id, value)
rescue => e
- ForemanTasks.dynflow.world.logger.error('Error on on_execution_plan_save event')
- ForemanTasks.dynflow.world.logger.error(e.message)
- ForemanTasks.dynflow.world.logger.error(e.backtrace.join("\n"))
+ Foreman::Logging.exception("Error on on_execution_plan_save event", e, :logger => Foreman::Logging.logger('foreman-tasks/dynflow'))
end
end
ensure
::ActiveRecord::Base.clear_active_connections! if clear_connections
end