Discard concurrency errors in jobs

Attempt to fix https://github.com/hackclub/hackatime/issues/292
This commit is contained in:
Max Wofford
2025-06-09 02:52:47 -04:00
parent ee48b77e06
commit 21cb303bd7

View File

@@ -3,5 +3,8 @@ class ApplicationJob < ActiveJob::Base
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
discard_on ActiveJob::DeserializationError
# Discard jobs that exceed concurrency limits
discard_on GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError
end