Skip to content

Commit

Permalink
Allow changing the base class for EventJob (#483)
Browse files Browse the repository at this point in the history
* Allow changing the base class for `EventJob`

This is necessary if you want to change the queue for `EventJob`. Otherwise #192 (comment) doesn't work.

* remove this entirely

* changelog

* oops
  • Loading branch information
ghiculescu authored Sep 5, 2024
1 parent 9b1be49 commit d13341c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Unreleased

* The `parent_class` configuration now also changes the parent class for `Noticed::EventJob`.

### 2.4.1

* Include private methods when checking if respond_to?(:method). Fixes #475
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 d13341c

Please sign in to comment.