resque-sliders 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,7 +65,15 @@ module Resque
65
65
 
66
66
  while @pids.keys.length < @max_children && (@need_queues.length > 0 || @dead_queues.length > 0)
67
67
  queue = @dead_queues.shift || @need_queues.shift
68
- @pids.store(fork { exec("rake#{' -f ' + @rakefile if @rakefile}#{' environment' if ENV['RAILS_ENV']} resque:work QUEUE=#{queue}") }, queue) # store offset if linux fork() ?
68
+ pid = fork do
69
+ exec_string = "rake#{' -f ' + @rakefile if @rakefile}#{' environment' if ENV['RAILS_ENV']} resque:work"
70
+ if RUBY_VERSION < '1.9'
71
+ exec(exec_string + " QUEUE=#{queue}") # 1.8.x exec
72
+ else
73
+ exec({"QUEUE"=>queue}, exec_string) # 1.9.x exec
74
+ end
75
+ end
76
+ @pids.store(pid, queue) # store offset if linux fork() ?
69
77
  procline
70
78
  end
71
79
  end
@@ -15,6 +15,7 @@ module Resque
15
15
  public_view(params[key], key == 'img' ? 'images' : key)
16
16
  else
17
17
  @sliders = Commander.new
18
+ redirect "/sliders/#{@sliders.all_hosts.first}" if @sliders.all_hosts.length == 1
18
19
  slider_view :index
19
20
  end
20
21
  end
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module ResqueSliders
4
- Version = VERSION = '0.1.0'
4
+ Version = VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-sliders
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
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-05-11 00:00:00.000000000 Z
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: resque
16
- requirement: &2152455020 !ruby/object:Gem::Requirement
16
+ requirement: &2152608100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.15.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152455020
24
+ version_requirements: *2152608100
25
25
  description: ! " Resque-Sliders is a plugin for Resque that enables you to control
26
26
  multiple hosts'\n running resque workers with a monitor PID watching over them.
27
27
  \ From the resque-web UI, you\n can add/delete/change which queues are running