em-resque 1.0.0.beta2 → 1.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module Resque
3
- Version = VERSION = '1.0.0.beta2'
3
+ Version = VERSION = '1.0.0.beta3'
4
4
  end
5
5
  end
@@ -33,6 +33,7 @@ module EventMachine
33
33
  @verbose = opts[:logging] || opts[:verbose] || false
34
34
  @very_verbose = opts[:vverbose] || false
35
35
  @pidfile = opts[:pidfile]
36
+ @redis = opts[:redis].split('/', 3).last.split(':') if opts[:redis]
36
37
 
37
38
  raise(ArgumentError, "Should have at least one fiber") if @fibers_count.to_i < 1
38
39
 
@@ -46,6 +47,7 @@ module EventMachine
46
47
  # Start the machine and start polling queues.
47
48
  def start
48
49
  EM.synchrony do
50
+ EM::Resque.redis = EM::Protocols::Redis.connect(:host => @redis[0], :port => @redis[1])
49
51
  @fibers.each(&:resume)
50
52
  system_monitor.resume
51
53
  end
data/lib/em-resque.rb CHANGED
@@ -7,7 +7,8 @@ module EM::Resque
7
7
  case server
8
8
  when String
9
9
  if server =~ /redis\:\/\//
10
- redis = EM::Protocols::Redis.connect(:url => server, :thread_safe => true)
10
+ host, port = server.split('/', 3).last.split(':')
11
+ redis = EM::Protocols::Redis.connect(:host => host, :port => port)
11
12
  else
12
13
  server, namespace = server.split('/', 2)
13
14
  host, port, db = server.split(':')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta2
4
+ version: 1.0.0.beta3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-09 00:00:00.000000000 Z
12
+ date: 2012-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: resque
16
- requirement: &9303860 !ruby/object:Gem::Requirement
16
+ requirement: &13289380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.19.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9303860
24
+ version_requirements: *13289380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: em-synchrony
27
- requirement: &9303200 !ruby/object:Gem::Requirement
27
+ requirement: &13288720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *9303200
35
+ version_requirements: *13288720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-redis
38
- requirement: &9302720 !ruby/object:Gem::Requirement
38
+ requirement: &13288200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *9302720
46
+ version_requirements: *13288200
47
47
  description: ! " Em-resque is a version of Resque, which offers non-blocking and
48
48
  non-forking\n workers. The idea is to have fast as possible workers for tasks
49
49
  with lots of\n IO like pinging third party servers or hitting the database.\n\n