Serialization interface #333
fractaledmind
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I maintain a newer Ruby gem for helping to make Jobs more resilient by leaning on ACIDic database transactions: http://github.com/fractaledmind/acidic_job
At the heart of this approach is essentially tracking job runs via a database record. One essential ingredient for this to work is to be able to serialize and deserialize jobs, so that I can store a job run and then later start that job with the job queue. ActiveJob provides the following interface which makes this straightforward:
I faced similar limitations with Sidekiq and opened a similar issue and a corresponding PR to bring a serialization interface to Sidekiq workers.
The central need is to have a way from within a notifier to pause execution of the other delivery methods after the database, store the "instructions" in a database record, which can then be read and used to re-initiate those instructions later.
At the moment, I have this hack that extends the gem with a
deliver_transactionally
method. I am trying to figure out the best way to extendnoticed
to make an extension like this less hacky:I'm opening this issue to get some feedback from the community and any wisdom from @excid3 himself hopefully.
Beta Was this translation helpful? Give feedback.
All reactions