summaryrefslogtreecommitdiff
path: root/app/jobs/application_job.rb
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-04-21 20:59:17 -0400
committerDavid Gay <david@davidgay.org>2021-04-21 20:59:17 -0400
commit975ab9e285baf4f1b22b60104db4f8f982c1db8b (patch)
tree7ad97e350a11d61f0b356e81fa759baf648dcd1c /app/jobs/application_job.rb
New Rails project with pgsql
Diffstat (limited to 'app/jobs/application_job.rb')
-rw-r--r--app/jobs/application_job.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb
new file mode 100644
index 0000000..d394c3d
--- /dev/null
+++ b/app/jobs/application_job.rb
@@ -0,0 +1,7 @@
+class ApplicationJob < ActiveJob::Base
+ # Automatically retry jobs that encountered a deadlock
+ # retry_on ActiveRecord::Deadlocked
+
+ # Most jobs are safe to ignore if the underlying records are no longer available
+ # discard_on ActiveJob::DeserializationError
+end