Skip to content

Commit 7e96d48

Browse files
Make sure opts[:threads] always has a default here
References #312 and #279.
1 parent 7e7b926 commit 7e96d48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/sneakers/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(queue = nil, pool = nil, opts = {})
1919

2020
@should_ack = opts[:ack]
2121
@timeout_after = opts[:timeout_job_after]
22-
@pool = pool || Concurrent::FixedThreadPool.new(opts[:threads])
22+
@pool = pool || Concurrent::FixedThreadPool.new(opts[:threads] || Sneakers::Configuration::DEFAULTS[:threads])
2323
@call_with_params = respond_to?(:work_with_params)
2424
@content_type = opts[:content_type]
2525

0 commit comments

Comments
 (0)