Skip to content

Commit

Permalink
Wrap Notifier's refresh_process with Rails executor (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon authored Jul 11, 2023
1 parent 017da08 commit 7559b4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/good_job/notifier/process_heartbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ def register_process
end

def refresh_process
GoodJob::Process.with_connection(connection) do
Process.logger.silence do
@process&.refresh_if_stale(cleanup: true)
Rails.application.executor.wrap do
GoodJob::Process.with_connection(connection) do
GoodJob::Process.logger.silence do
@process&.refresh_if_stale(cleanup: true)
end
end
end
end
Expand Down

0 comments on commit 7559b4d

Please sign in to comment.