Open sepastian opened 9 years ago
"Solved."
Don't use Resque 2.0, use 1-x-stable
. Version 2 It is not ready yet. Unfortunately, figuring that out took way too long, because the README is not clear about it.
Don't use ActiveJob. Without further investigating this, callbacks/hooks did not get called when wrapping ActiveJob aroud Resque. Using Resque directly enables callbacks.
Hope this is useful for anyone. I'm leaving this open, just in case there is a better solution...
(For completeness, I'm now using Rails 4.2 and resque 1-x-stable
.)
before I was using enqueue_batched_job, I can't seem to find anything on syntax for enqueueing a batched job w/ activejob.. anything I need to change or should I just leave them the same?
It appears ActiveJob is an abstraction layer for jobs and the actual backend job processing framework. resque-batched-job is a hackery that implements #enqueue_batched_job
which is not and probably will never be included in the ActiveJob smoke screen. I suggest keep rocking the #enqueue_batched_job
method or monkey patch ActiveJob locally.
How does one use resque-batched-job with activejob? My
self.after_batch_finished
hook never gets invoked.What am I doing wrong?