lib/backburner/worker.rb in backburner-allq-1.0.31 vs lib/backburner/worker.rb in backburner-allq-1.0.32
- old
+ new
@@ -38,10 +38,17 @@
response = nil
connection = Backburner::Connection.new(Backburner.configuration.allq_url)
connection.retryable do
tube_name = expand_tube_name(queue || job_class)
serialized_data = Backburner.configuration.job_serializer_proc.call(data)
- response = connection.put(tube_name, serialized_data, :pri => pri, :delay => delay, :ttr => ttr, :shard_key => opts[:shard_key])
+ send_data = {
+ pri: pri,
+ delay: delay,
+ ttr: ttr
+ }
+ opts.merge!(send_data)
+
+ response = connection.put(tube_name, serialized_data, opts)
end
return nil unless Backburner::Hooks.invoke_hook_events(job_class, :after_enqueue, *args)
ensure
connection.close if connection
end