Skip to content

Commit

Permalink
Allow changing the base class for EventJob
Browse files Browse the repository at this point in the history
This is necessary if you want to change the queue for `EventJob`. Otherwise #192 (comment) doesn't work.
  • Loading branch information
ghiculescu committed Aug 28, 2024
1 parent 423a33b commit 92cc1d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/jobs/noticed/application_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module Noticed
class ApplicationJob < ActiveJob::Base
queue_as :default

# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked

Expand Down
4 changes: 1 addition & 3 deletions app/jobs/noticed/event_job.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Noticed
class EventJob < ApplicationJob
queue_as :default

class EventJob < Noticed.parent_class.constantize
def perform(event)
# Enqueue bulk deliveries
event.bulk_delivery_methods.each_value do |deliver_by|
Expand Down

0 comments on commit 92cc1d2

Please sign in to comment.