OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add some debugging information to the notifications
Oliver Günther57beed0316f0
diff --git a/app/workers/active_job/job_status_listener.rb b/app/workers/active_job/job_status_listener.rbindex 70121cdd241..5e81d430948 100644--- a/app/workers/active_job/job_status_listener.rb+++ b/app/workers/active_job/job_status_listener.rb@@ -32,31 +32,41 @@ module ActiveJobdef register!# Listen to enqueuesActiveSupport::Notifications.subscribe(/enqueue(_at)?\.active_job/) do |_name, job:, **_args|+ Rails.logger.debug { "Enqueuing background job #{job.inspect}" }create_job_status(job) unless job.store_status?end# Start of processActiveSupport::Notifications.subscribe('perform_start.active_job') do |job:, **_args|+ Rails.logger.debug { "Background job #{job.inspect} is being started" }on_start(job) unless job.store_status?end# Complete, or failureActiveSupport::Notifications.subscribe('perform.active_job') do |job:, exception_object: nil, **_args|+ Rails.logger.debug do+ successful = exception_object ? "with error: #{exception_object}" : "successful"+ "Background job #{job.inspect} was performed #{successful}." }+ end+on_performed(job, exception_object) unless job.store_status?end# Retry stopped -> failureActiveSupport::Notifications.subscribe('retry_stopped.active_job') do |job:, error: nil, **_args|+ Rails.logger.debug { "Background job #{job.inspect} no longer retrying due to: #{error}" }on_performed(job, error) unless job.store_status?end# Retry enqueuedActiveSupport::Notifications.subscribe('enqueue_retry.active_job') do |job, error: nil, **_args|+ Rails.logger.debug { "Background job #{job.inspect} is being retried after error: #{error}" }on_requeue(job, error) unless job.store_status?end# Discarded jobActiveSupport::Notifications.subscribe('discard.active_job') do |job:, error: nil, **_args|+ Rails.logger.debug { "Background job #{job.inspect} is being discarded after error: #{error}" }on_cancelled(job, error) unless job.store_status?endend