From 3a3e971639c9e7286b7442874afb20b352577e42 Mon Sep 17 00:00:00 2001 From: Josh Sharpe Date: Mon, 6 Apr 2020 15:44:15 -0400 Subject: [PATCH] add support for queueing ActiveJob jobs --- lib/resque/scheduler.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/resque/scheduler.rb b/lib/resque/scheduler.rb index 523b1840..115e30b7 100644 --- a/lib/resque/scheduler.rb +++ b/lib/resque/scheduler.rb @@ -276,6 +276,8 @@ def enqueue_from_config(job_config) # CustomJobClass). Otherwise, pass off to Resque. if klass.respond_to?(:scheduled) klass.scheduled(queue, klass_name, *params) + elsif klass.respond_to?(:perform_later) + klass.set(queue: queue).perform_later(*params) else Resque.enqueue_to(queue, klass, *params) end