diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index dbf4fb289..8d3704133 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -10,6 +10,10 @@ class ApplicationJob < ActiveJob::Base before_enqueue :add_good_job_labels + after_perform do + ActiveRecord::Base.clear_active_connections! + end + good_job_control_concurrency_with( # Maximum number of unfinished jobs to allow with the concurrency key # Can be an Integer or Lambda/Proc that is invoked in the context of the job @@ -92,6 +96,4 @@ def prepare_arguments_for_digest(arguments) : argument.to_json } end - - end