You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you add the before_start and other callbacks to a base class, then inherit that to a worker, it will not trigger the callbacks.
You have to prepend Sqeduler::Worker::Callbacks on each child class. It would be nice to have it work on the base class also so we can reduce duplication.
There is a work around: that is to prepend and then include the before_start and other callbacks from a module.
So this:
class AwardWorker < BaseWorker
prepend Sqeduler::Worker::Callbacks
include Logging::Callbacks
etc. for each class
Instead of this just once:
class BaseWorker
prepend Sqeduler::Worker::Callbacks
include Logging::Callbacks
Logging::Callbacks is where the private method before_start is found.
The text was updated successfully, but these errors were encountered:
If you add the before_start and other callbacks to a base class, then inherit that to a worker, it will not trigger the callbacks.
You have to prepend Sqeduler::Worker::Callbacks on each child class. It would be nice to have it work on the base class also so we can reduce duplication.
There is a work around: that is to prepend and then include the before_start and other callbacks from a module.
So this:
Instead of this just once:
Logging::Callbacks is where the private method before_start is found.
The text was updated successfully, but these errors were encountered: