resque/resque-scheduler

enqueue_delayed_selection doesn't seem to work

msmiller opened this issue · 1 comments

find_delayed_selection works, but not the enqueue function. The jobs remain queued up. Here's what I was trying to do:

result = Resque.find_delayed_selection { |args| args[0]['job_id'] == self.showing_meta.autocancel_job_id }
ap result
# => [
    [0] "{\"class\":\"ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper\",\"args\":[{\"job_class\":\"AdvanceShowingJob\",\"job_id\":\"3bfce2cd-ec38-49bc-a875-f3c5b03a1060\",\"provider_job_id\":null,\"queue_name\":\"default\",\"priority\":null,\"arguments\":[{\"_aj_globalid\":\"gid://schedulerapi/Showing/39\"},\"e_autocancel!\"],\"executions\":0,\"locale\":\"en\"}],\"queue\":\"default\"}"
]
result = Resque.enqueue_delayed_selection { |args| args[0]['job_id'] == self.showing_meta.autocancel_job_id }
ap result
# => 0

Same problem. I'm using ActiveJob.