Skip to content

Commit 86cb92c

Browse files
author
vadim.kar
committed
f
1 parent 2b246c6 commit 86cb92c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rabbit.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def publish(
190190
headers: headers,
191191
message_id: message_id,
192192
)
193-
publish_job_callable = config.publishing_job_class_callable || Publishing::Job
193+
job_class = config.publishing_job_class_callable
194+
publish_job_callable = job_class.is_a?(Proc) ? job_class.call : (job_class || Publishing::Job)
194195
queue_name = custom_queue_name || default_queue_name
195196

196197
if message.realtime?

0 commit comments

Comments
 (0)