Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

worker : :start option

  • Loading branch information...
commit cb5c169be1dacbeafcf481d8c89348a154b99cda 1 parent b2ae594
@jmettraux authored
Showing with 7 additions and 2 deletions.
  1. +6 −1 lib/register/worker.rb
  2. +1 −1  spec/worker_spec.rb
View
7 lib/register/worker.rb
@@ -30,7 +30,12 @@ class Worker
attr_reader :client
attr_reader :running
- def initialize(redis_opts, start=true)
+ # TODO : :start option
+ #
+ def initialize(redis_opts)
+
+ start = redis_opts.delete(:start)
+ start = start.nil? ? true : start
@client = Register::Client.new(redis_opts)
@running = false
View
2  spec/worker_spec.rb
@@ -4,7 +4,7 @@
describe Register::Worker do
- let(:wo) { Register::Worker.new(REDIS_OPTIONS, false) }
+ let(:wo) { Register::Worker.new(REDIS_OPTIONS.merge(:start => false)) }
before(:each) do
Please sign in to comment.
Something went wrong with that request. Please try again.