activejob-traffic_control icon indicating copy to clipboard operation
activejob-traffic_control copied to clipboard

disable! & enable! job perpetually stuck

Open mr-romeijn opened this issue 4 years ago • 0 comments

How is enable! and disable! supposed to work?

I'm using sidekiq and check a certain condition throughout the execution of the job and disable or enable it based ons said condition. However the job seems to get perpetually stuck in a planned state.

I'm using memory_store as cache client.

ActiveJob::TrafficControl.cache_client = ActiveSupport::Cache.lookup_store(:memory_store)

code managing the state:

Job.disable! unless @asset.ready?
Job.enable!  if     @asset.ready?

mr-romeijn avatar Nov 12 '20 08:11 mr-romeijn