Skip to content

Commit a8e8183

Browse files
committed
back schedule_arg to AsyncProxy
1 parent 3dcc3c6 commit a8e8183

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/sidekiqable/async_proxy.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ def method_missing(method_name, *args, &block)
2121
callable = "#{@target_class.name}.#{method_name}"
2222
payload = [callable, *args]
2323

24-
worker.send(@mode, *payload)
24+
case @mode
25+
when :perform_async
26+
worker.perform_async(*payload)
27+
when :perform_in
28+
worker.perform_in(@schedule_arg, *payload)
29+
when :perform_at
30+
worker.perform_at(@schedule_arg, *payload)
31+
end
2532
end
2633

2734
def respond_to_missing?(method_name, include_private = false)

0 commit comments

Comments
 (0)