Skip to content

Why is the use of ActiveJob::Base enforced? #1219

Answered by mostlyobvious
edjames asked this question in Q&A
Discussion options

You must be logged in to vote

Is there a reason for this?

It's an ActiveJob scheduler. It's assuming you always have ActiveJob framework in Rails, when installing rails_event_store that depends on Rails. It does not assume what's below ActiveJob facade, that's the whole point of the facade.

Whether you have Sidekiq or not in your project, and whether you want to use it via ActiveJob or directly is up to you. There's nothing in rails_event_store preventing you from doing this. Quite the contrary.

With 2 small monkey patches

There's no need to monkey patch at all. You'll want to pass a different scheduler that talks to Sidekiq directly, skipping ActiveJob.

There's even 20-LOC-gem released to make it easier:
https://…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@edjames
Comment options

Answer selected by edjames
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1218 on October 07, 2021 12:25.