resque_ui 3.1.6 → 3.1.7
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.
- data/History.txt +7 -0
- data/VERSION.yml +1 -1
- data/lib/resque_ui/cap_recipes.rb +24 -17
- data/lib/resque_ui/overrides/resque/worker.rb +8 -20
- data/lib/tasks/worker.rake +16 -2
- data/rdoc/Resque/Worker.html +16 -59
- data/rdoc/created.rid +3 -3
- data/rdoc/index.html +5 -7
- data/rdoc/lib/resque_ui/cap_rb.html +1 -1
- data/rdoc/lib/resque_ui/cap_recipes_rb.html +2 -2
- data/rdoc/lib/resque_ui/overrides/resque/job_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque/resque_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque/worker_rb.html +2 -2
- data/rdoc/lib/resque_ui/overrides/resque_scheduler/resque_scheduler_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/chained_job_with_status_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/job_with_status_rb.html +1 -1
- data/rdoc/lib/resque_ui/overrides/resque_status/status_rb.html +1 -1
- data/rdoc/lib/resque_ui_rb.html +1 -1
- data/resque_ui.gemspec +5 -5
- metadata +3 -5
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 3.1.7 2011-11-03
|
2
|
+
|
3
|
+
* It seems that when jruby workers are started in server mode, they don't accept the -INT signal.
|
4
|
+
Changed the logic to send the -TERM signal if jruby, and -QUIT otherwise.
|
5
|
+
-TERM gracefully kills the main pid and does a -9 on the child if there is one.
|
6
|
+
Since jruby doesn't fork a child, the main worker is gracefully killed.
|
7
|
+
|
1
8
|
== 3.1.6 2011-11-02
|
2
9
|
|
3
10
|
* Need the resque:restart cap task to pass the resque_rake value to the resque:restart rake task so it can start workers with the modified rake options
|
data/VERSION.yml
CHANGED
@@ -50,18 +50,18 @@
|
|
50
50
|
#fi
|
51
51
|
|
52
52
|
Capistrano::Configuration.instance(:must_exist).load do
|
53
|
-
|
53
|
+
|
54
54
|
def get_rake
|
55
55
|
fetch(:resque_rake, fetch(:rake, "rake"))
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
namespace :resque do
|
59
59
|
desc "start a resque worker. optional arg: host=ip queue=name"
|
60
60
|
task :work, :roles => :resque do
|
61
61
|
default_run_options[:pty] = true
|
62
|
-
hosts
|
63
|
-
queue
|
64
|
-
rake
|
62
|
+
hosts = ENV['host'] || find_servers_for_task(current_task).collect { |s| s.host }
|
63
|
+
queue = ENV['queue'] || '*'
|
64
|
+
rake = get_rake
|
65
65
|
run("cd #{current_path}; nohup #{rake} RAILS_ENV=#{stage} QUEUE=#{queue} resque:work >> log/resque_worker.log 2>&1", :hosts => hosts)
|
66
66
|
end
|
67
67
|
|
@@ -71,14 +71,21 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
71
71
|
puts 'You must enter the host and pid to kill..cap resque:quit host=ip pid=pid'
|
72
72
|
else
|
73
73
|
hosts = ENV['host'] || find_servers_for_task(current_task).collect { |s| s.host }
|
74
|
-
|
74
|
+
if RUBY_PLATFORM =~ /java/
|
75
|
+
#jruby doesn't trap the -QUIT signal
|
76
|
+
#-TERM gracefully kills the main pid and does a -9 on the child if there is one.
|
77
|
+
#Since jruby doesn't fork a child, the main worker is gracefully killed.
|
78
|
+
run("kill -TERM #{ENV['pid']}", :hosts => hosts)
|
79
|
+
else
|
80
|
+
run("kill -QUIT #{ENV['pid']}", :hosts => hosts)
|
81
|
+
end
|
75
82
|
end
|
76
83
|
end
|
77
84
|
|
78
85
|
desc "Gracefully kill all workers on all servers. If the worker is working, it will finish before shutting down."
|
79
86
|
task :quit_workers, :roles => :resque do
|
80
87
|
default_run_options[:pty] = true
|
81
|
-
rake
|
88
|
+
rake = fetch(:rake, "rake")
|
82
89
|
run("cd #{current_path}; #{rake} RAILS_ENV=#{stage} resque:quit_workers")
|
83
90
|
end
|
84
91
|
|
@@ -95,24 +102,24 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
95
102
|
desc "Kill all rogue workers on all servers. If the worker is working, it will not finish and the job will go to the Failed queue as a DirtyExit."
|
96
103
|
task :kill_workers_with_impunity, :roles => :resque do
|
97
104
|
default_run_options[:pty] = true
|
98
|
-
rake
|
105
|
+
rake = fetch(:rake, "rake")
|
99
106
|
run("cd #{current_path}; #{rake} RAILS_ENV=#{stage} resque:kill_workers_with_impunity")
|
100
107
|
end
|
101
108
|
|
102
109
|
desc "start multiple resque workers. arg:count=x optional arg: host=ip queue=name"
|
103
110
|
task :workers, :roles => :resque do
|
104
111
|
default_run_options[:pty] = true
|
105
|
-
hosts
|
106
|
-
queue
|
107
|
-
count
|
108
|
-
rake
|
112
|
+
hosts = ENV['host'] || find_servers_for_task(current_task).collect { |s| s.host }
|
113
|
+
queue = ENV['queue'] || '*'
|
114
|
+
count = ENV['count'] || '1'
|
115
|
+
rake = get_rake
|
109
116
|
run("cd #{current_path}; nohup #{rake} RAILS_ENV=#{stage} COUNT=#{count} QUEUE=#{queue} resque:work >> log/resque_worker.log 2>&1", :hosts => hosts)
|
110
117
|
end
|
111
118
|
|
112
119
|
desc "Restart all workers on all servers"
|
113
120
|
task :restart_workers, :roles => :resque do
|
114
121
|
default_run_options[:pty] = true
|
115
|
-
rake
|
122
|
+
rake = fetch(:rake, "rake")
|
116
123
|
#pass the rake options to the rake task so the workers can be started with the options.
|
117
124
|
run("cd #{current_path}; RAILS_ENV=#{stage} RAKE_WITH_OPTS='#{get_rake}' nohup #{rake} resque:restart_workers")
|
118
125
|
end
|
@@ -124,8 +131,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
124
131
|
desc "start a resque worker. optional arg: host=ip queue=name"
|
125
132
|
task :scheduler, :roles => :resque do
|
126
133
|
default_run_options[:pty] = true
|
127
|
-
hosts
|
128
|
-
rake
|
134
|
+
hosts = ENV['host'] || find_servers_for_task(current_task).collect { |s| s.host }
|
135
|
+
rake = fetch(:rake, "rake")
|
129
136
|
run("cd #{current_path}; nohup #{rake} RAILS_ENV=#{stage} resque:scheduler", :hosts => hosts)
|
130
137
|
end
|
131
138
|
|
@@ -135,14 +142,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
135
142
|
puts 'You must enter the host to kill..cap resque:quit_scheduler host=ip pid=pid'
|
136
143
|
else
|
137
144
|
hosts = ENV['host'] || find_servers_for_task(current_task).collect { |s| s.host }
|
138
|
-
rake
|
145
|
+
rake = fetch(:rake, "rake")
|
139
146
|
run("cd #{current_path}; nohup #{rake} RAILS_ENV=#{stage} resque:quit_scheduler", :hosts => hosts)
|
140
147
|
end
|
141
148
|
end
|
142
149
|
|
143
150
|
desc "Determine if the scheduler is running or not on a server"
|
144
151
|
task :scheduler_status, :roles => :resque do
|
145
|
-
hosts
|
152
|
+
hosts = ENV['hosts'].to_s.split(',') || find_servers_for_task(current_task).collect { |s| s.host }
|
146
153
|
|
147
154
|
status = nil
|
148
155
|
|
@@ -100,25 +100,6 @@ module Resque
|
|
100
100
|
workers_in_pid.select { |w| (hash = w.processing) && !hash.empty? }
|
101
101
|
end
|
102
102
|
|
103
|
-
# Jruby won't allow you to trap the QUIT signal, so we're changing the INT signal to replace it for Jruby.
|
104
|
-
def register_signal_handlers
|
105
|
-
trap('TERM') { shutdown! }
|
106
|
-
trap('INT') { shutdown }
|
107
|
-
|
108
|
-
begin
|
109
|
-
s = trap('QUIT') { shutdown }
|
110
|
-
warn "Signal QUIT not supported." unless s
|
111
|
-
s = trap('USR1') { kill_child }
|
112
|
-
warn "Signal USR1 not supported." unless s
|
113
|
-
s = trap('USR2') { pause_processing }
|
114
|
-
warn "Signal USR2 not supported." unless s
|
115
|
-
s = trap('CONT') { unpause_processing }
|
116
|
-
warn "Signal CONT not supported." unless s
|
117
|
-
rescue ArgumentError
|
118
|
-
warn "Signals QUIT, USR1, USR2, and/or CONT not supported."
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
103
|
# This is the main workhorse method. Called on a Worker instance,
|
123
104
|
# it begins the worker life cycle.
|
124
105
|
#
|
@@ -214,7 +195,14 @@ module Resque
|
|
214
195
|
|
215
196
|
def quit
|
216
197
|
if Rails.env =~ /development|test/
|
217
|
-
|
198
|
+
if RUBY_PLATFORM =~ /java/
|
199
|
+
#jruby doesn't trap the -QUIT signal
|
200
|
+
#-TERM gracefully kills the main pid and does a -9 on the child if there is one.
|
201
|
+
#Since jruby doesn't fork a child, the main worker is gracefully killed.
|
202
|
+
system("kill -TERM #{self.pid}")
|
203
|
+
else
|
204
|
+
system("kill -QUIT #{self.pid}")
|
205
|
+
end
|
218
206
|
else
|
219
207
|
system("cd #{Rails.root}; #{ResqueUi::Cap.path} #{Rails.env} resque:quit_worker pid=#{self.pid} host=#{self.ip}")
|
220
208
|
end
|
data/lib/tasks/worker.rake
CHANGED
@@ -51,7 +51,14 @@ namespace :resque do
|
|
51
51
|
Resque.workers.sort_by { |w| w.to_s }.each do |worker|
|
52
52
|
if local_ip == worker.ip # only restart the workers that are on this server
|
53
53
|
if pid != worker.pid
|
54
|
-
|
54
|
+
if RUBY_PLATFORM =~ /java/
|
55
|
+
#jruby doesn't trap the -QUIT signal
|
56
|
+
#-TERM gracefully kills the main pid and does a -9 on the child if there is one.
|
57
|
+
#Since jruby doesn't fork a child, the main worker is gracefully killed.
|
58
|
+
system("kill -TERM #{worker.pid}")
|
59
|
+
else
|
60
|
+
system("kill -QUIT #{worker.pid}")
|
61
|
+
end
|
55
62
|
queues = worker.queues_in_pid.join('#')
|
56
63
|
Thread.new(queues) { |queue| system("nohup #{rake} RAILS_ENV=#{Rails.env} QUEUE=#{queue} resque:work") }
|
57
64
|
pid = worker.pid
|
@@ -68,7 +75,14 @@ namespace :resque do
|
|
68
75
|
Resque.workers.sort_by { |w| w.to_s }.each do |worker|
|
69
76
|
if local_ip == worker.ip # only quit the workers that are on this server
|
70
77
|
if pid != worker.pid
|
71
|
-
|
78
|
+
if RUBY_PLATFORM =~ /java/
|
79
|
+
#jruby doesn't trap the -QUIT signal
|
80
|
+
#-TERM gracefully kills the main pid and does a -9 on the child if there is one.
|
81
|
+
#Since jruby doesn't fork a child, the main worker is gracefully killed.
|
82
|
+
system("kill -TERM #{worker.pid}")
|
83
|
+
else
|
84
|
+
system("kill -QUIT #{worker.pid}")
|
85
|
+
end
|
72
86
|
pid = worker.pid
|
73
87
|
end
|
74
88
|
end
|
data/rdoc/Resque/Worker.html
CHANGED
@@ -89,8 +89,6 @@
|
|
89
89
|
|
90
90
|
<li><a href="#method-i-quit">#quit</a></li>
|
91
91
|
|
92
|
-
<li><a href="#method-i-register_signal_handlers">#register_signal_handlers</a></li>
|
93
|
-
|
94
92
|
<li><a href="#method-i-restart">#restart</a></li>
|
95
93
|
|
96
94
|
<li><a href="#method-i-shutdown">#shutdown</a></li>
|
@@ -211,7 +209,7 @@
|
|
211
209
|
|
212
210
|
<div class="method-source-code" id="start-source">
|
213
211
|
<pre>
|
214
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
212
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 188</span>
|
215
213
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">ips</span>, <span class="ruby-identifier">queues</span>)
|
216
214
|
<span class="ruby-keyword">if</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">env</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/development|test/</span>
|
217
215
|
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">queues</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">queue</span><span class="ruby-operator">|</span> <span class="ruby-identifier">system</span>(<span class="ruby-node">"rake RAILS_ENV=#{Rails.env} QUEUE=#{queue} resque:work"</span>) }
|
@@ -249,7 +247,7 @@ latest redis gem.</p>
|
|
249
247
|
|
250
248
|
<div class="method-source-code" id="working-source">
|
251
249
|
<pre>
|
252
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
250
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 162</span>
|
253
251
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">working</span>
|
254
252
|
<span class="ruby-identifier">names</span> = <span class="ruby-identifier">all</span>
|
255
253
|
<span class="ruby-keyword">return</span> [] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">names</span>.<span class="ruby-identifier">any?</span>
|
@@ -608,10 +606,17 @@ determine if Redis is old and clean it up a bit.</p>
|
|
608
606
|
|
609
607
|
<div class="method-source-code" id="quit-source">
|
610
608
|
<pre>
|
611
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
609
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 196</span>
|
612
610
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">quit</span>
|
613
611
|
<span class="ruby-keyword">if</span> <span class="ruby-constant">Rails</span>.<span class="ruby-identifier">env</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/development|test/</span>
|
614
|
-
<span class="ruby-
|
612
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/java/</span>
|
613
|
+
<span class="ruby-comment">#jruby doesn't trap the -QUIT signal</span>
|
614
|
+
<span class="ruby-comment">#-TERM gracefully kills the main pid and does a -9 on the child if there is one.</span>
|
615
|
+
<span class="ruby-comment">#Since jruby doesn't fork a child, the main worker is gracefully killed.</span>
|
616
|
+
<span class="ruby-identifier">system</span>(<span class="ruby-node">"kill -TERM #{self.pid}"</span>)
|
617
|
+
<span class="ruby-keyword">else</span>
|
618
|
+
<span class="ruby-identifier">system</span>(<span class="ruby-node">"kill -QUIT #{self.pid}"</span>)
|
619
|
+
<span class="ruby-keyword">end</span>
|
615
620
|
<span class="ruby-keyword">else</span>
|
616
621
|
<span class="ruby-identifier">system</span>(<span class="ruby-node">"cd #{Rails.root}; #{ResqueUi::Cap.path} #{Rails.env} resque:quit_worker pid=#{self.pid} host=#{self.ip}"</span>)
|
617
622
|
<span class="ruby-keyword">end</span>
|
@@ -626,54 +631,6 @@ determine if Redis is old and clean it up a bit.</p>
|
|
626
631
|
</div><!-- quit-method -->
|
627
632
|
|
628
633
|
|
629
|
-
<div id="register_signal_handlers-method" class="method-detail ">
|
630
|
-
<a name="method-i-register_signal_handlers"></a>
|
631
|
-
|
632
|
-
|
633
|
-
<div class="method-heading">
|
634
|
-
<span class="method-name">register_signal_handlers</span><span
|
635
|
-
class="method-args">()</span>
|
636
|
-
<span class="method-click-advice">click to toggle source</span>
|
637
|
-
</div>
|
638
|
-
|
639
|
-
|
640
|
-
<div class="method-description">
|
641
|
-
|
642
|
-
<p>Jruby won’t allow you to trap the QUIT signal, so we’re changing the
|
643
|
-
INT signal to replace it for Jruby.</p>
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
<div class="method-source-code" id="register_signal_handlers-source">
|
648
|
-
<pre>
|
649
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 104</span>
|
650
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_signal_handlers</span>
|
651
|
-
<span class="ruby-identifier">trap</span>(<span class="ruby-string">'TERM'</span>) { <span class="ruby-identifier">shutdown!</span> }
|
652
|
-
<span class="ruby-identifier">trap</span>(<span class="ruby-string">'INT'</span>) { <span class="ruby-identifier">shutdown</span> }
|
653
|
-
|
654
|
-
<span class="ruby-keyword">begin</span>
|
655
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">trap</span>(<span class="ruby-string">'QUIT'</span>) { <span class="ruby-identifier">shutdown</span> }
|
656
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-string">"Signal QUIT not supported."</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">s</span>
|
657
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">trap</span>(<span class="ruby-string">'USR1'</span>) { <span class="ruby-identifier">kill_child</span> }
|
658
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-string">"Signal USR1 not supported."</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">s</span>
|
659
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">trap</span>(<span class="ruby-string">'USR2'</span>) { <span class="ruby-identifier">pause_processing</span> }
|
660
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-string">"Signal USR2 not supported."</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">s</span>
|
661
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">trap</span>(<span class="ruby-string">'CONT'</span>) { <span class="ruby-identifier">unpause_processing</span> }
|
662
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-string">"Signal CONT not supported."</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">s</span>
|
663
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">ArgumentError</span>
|
664
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-string">"Signals QUIT, USR1, USR2, and/or CONT not supported."</span>
|
665
|
-
<span class="ruby-keyword">end</span>
|
666
|
-
<span class="ruby-keyword">end</span></pre>
|
667
|
-
</div><!-- register_signal_handlers-source -->
|
668
|
-
|
669
|
-
</div>
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
</div><!-- register_signal_handlers-method -->
|
675
|
-
|
676
|
-
|
677
634
|
<div id="restart-method" class="method-detail ">
|
678
635
|
<a name="method-i-restart"></a>
|
679
636
|
|
@@ -693,7 +650,7 @@ INT signal to replace it for Jruby.</p>
|
|
693
650
|
|
694
651
|
<div class="method-source-code" id="restart-source">
|
695
652
|
<pre>
|
696
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
653
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 211</span>
|
697
654
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">restart</span>
|
698
655
|
<span class="ruby-identifier">queues</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">queues_in_pid</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">'#'</span>)
|
699
656
|
<span class="ruby-identifier">quit</span>
|
@@ -811,7 +768,7 @@ current job.</pre>
|
|
811
768
|
|
812
769
|
<div class="method-source-code" id="status-source">
|
813
770
|
<pre>
|
814
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
771
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 184</span>
|
815
772
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">status</span>
|
816
773
|
<span class="ruby-identifier">job</span>[<span class="ruby-string">'status'</span>]
|
817
774
|
<span class="ruby-keyword">end</span></pre>
|
@@ -844,7 +801,7 @@ current job.</pre>
|
|
844
801
|
|
845
802
|
<div class="method-source-code" id="status-3D-source">
|
846
803
|
<pre>
|
847
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
804
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 179</span>
|
848
805
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">status=</span>(<span class="ruby-identifier">status</span>)
|
849
806
|
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">encode</span>(<span class="ruby-identifier">job</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">'status'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">status</span>))
|
850
807
|
<span class="ruby-identifier">redis</span>.<span class="ruby-identifier">set</span>(<span class="ruby-node">"worker:#{self}"</span>, <span class="ruby-identifier">data</span>)
|
@@ -966,7 +923,7 @@ has completed processing. Useful for testing.</pre>
|
|
966
923
|
|
967
924
|
<div class="method-source-code" id="work-source">
|
968
925
|
<pre>
|
969
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
926
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 120</span>
|
970
927
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">work</span>(<span class="ruby-identifier">interval</span> = <span class="ruby-value">5</span>, &<span class="ruby-identifier">block</span>)
|
971
928
|
<span class="ruby-identifier">$0</span> = <span class="ruby-string">"resque: Starting"</span>
|
972
929
|
<span class="ruby-identifier">startup</span>
|
@@ -1037,7 +994,7 @@ Useful when pruning dead workers on startup.</p>
|
|
1037
994
|
|
1038
995
|
<div class="method-source-code" id="worker_pids-source">
|
1039
996
|
<pre>
|
1040
|
-
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line
|
997
|
+
<span class="ruby-comment"># File lib/resque_ui/overrides/resque/worker.rb, line 173</span>
|
1041
998
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">worker_pids</span>
|
1042
999
|
<span class="ruby-value">`ps -A -o pid,command | grep [r]esque`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\n"</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
1043
1000
|
<span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">' '</span>)[<span class="ruby-value">0</span>]
|
data/rdoc/created.rid
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
Thu, 03 Nov 2011 11:03:52 -0400
|
2
2
|
README.markdown Thu, 27 Oct 2011 13:09:37 -0400
|
3
3
|
lib/resque_ui.rb Thu, 13 Oct 2011 11:42:34 -0400
|
4
4
|
lib/resque_ui/cap.rb Wed, 14 Sep 2011 16:39:33 -0400
|
5
|
-
lib/resque_ui/cap_recipes.rb
|
5
|
+
lib/resque_ui/cap_recipes.rb Thu, 03 Nov 2011 10:10:42 -0400
|
6
6
|
lib/resque_ui/overrides/resque/job.rb Fri, 16 Sep 2011 14:33:15 -0400
|
7
7
|
lib/resque_ui/overrides/resque/resque.rb Thu, 15 Sep 2011 12:15:57 -0400
|
8
|
-
lib/resque_ui/overrides/resque/worker.rb
|
8
|
+
lib/resque_ui/overrides/resque/worker.rb Thu, 03 Nov 2011 10:10:42 -0400
|
9
9
|
lib/resque_ui/overrides/resque_scheduler/resque_scheduler.rb Thu, 15 Sep 2011 11:57:02 -0400
|
10
10
|
lib/resque_ui/overrides/resque_status/chained_job_with_status.rb Thu, 15 Sep 2011 12:06:19 -0400
|
11
11
|
lib/resque_ui/overrides/resque_status/job_with_status.rb Thu, 15 Sep 2011 12:06:45 -0400
|
data/rdoc/index.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>ResqueUi 3.1.
|
9
|
+
<title>ResqueUi 3.1.7</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -19,10 +19,10 @@
|
|
19
19
|
<body class="indexpage">
|
20
20
|
|
21
21
|
|
22
|
-
<h1>ResqueUi 3.1.
|
22
|
+
<h1>ResqueUi 3.1.7</h1>
|
23
23
|
|
24
24
|
|
25
|
-
<p>This is the API documentation for 'ResqueUi 3.1.
|
25
|
+
<p>This is the API documentation for 'ResqueUi 3.1.7'.</p>
|
26
26
|
|
27
27
|
|
28
28
|
|
@@ -64,10 +64,10 @@
|
|
64
64
|
|
65
65
|
<li><a href="Resque/Status.html#method-c-counter_key">::counter_key — Resque::Status</a></li>
|
66
66
|
|
67
|
-
<li><a href="Resque/ChainedJobWithStatus.html#method-c-enqueue">::enqueue — Resque::ChainedJobWithStatus</a></li>
|
68
|
-
|
69
67
|
<li><a href="Resque/JobWithStatus.html#method-c-enqueue">::enqueue — Resque::JobWithStatus</a></li>
|
70
68
|
|
69
|
+
<li><a href="Resque/ChainedJobWithStatus.html#method-c-enqueue">::enqueue — Resque::ChainedJobWithStatus</a></li>
|
70
|
+
|
71
71
|
<li><a href="ResqueScheduler.html#method-c-farm_status">::farm_status — ResqueScheduler</a></li>
|
72
72
|
|
73
73
|
<li><a href="Resque/Status.html#method-c-incr_counter">::incr_counter — Resque::Status</a></li>
|
@@ -122,8 +122,6 @@
|
|
122
122
|
|
123
123
|
<li><a href="Resque/Worker.html#method-i-quit">#quit — Resque::Worker</a></li>
|
124
124
|
|
125
|
-
<li><a href="Resque/Worker.html#method-i-register_signal_handlers">#register_signal_handlers — Resque::Worker</a></li>
|
126
|
-
|
127
125
|
<li><a href="Resque/Worker.html#method-i-restart">#restart — Resque::Worker</a></li>
|
128
126
|
|
129
127
|
<li><a href="Resque/JobWithStatus.html#method-i-safe_perform-21">#safe_perform! — Resque::JobWithStatus</a></li>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: cap_recipes.rb [ResqueUi 3.1.
|
9
|
+
<title>File: cap_recipes.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<div id="metadata">
|
25
25
|
<dl>
|
26
26
|
<dt class="modified-date">Last Modified</dt>
|
27
|
-
<dd class="modified-date">
|
27
|
+
<dd class="modified-date">Thu Nov 03 10:10:42 -0400 2011</dd>
|
28
28
|
|
29
29
|
|
30
30
|
<dt class="requires">Requires</dt>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: job.rb [ResqueUi 3.1.
|
9
|
+
<title>File: job.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: resque.rb [ResqueUi 3.1.
|
9
|
+
<title>File: resque.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: worker.rb [ResqueUi 3.1.
|
9
|
+
<title>File: worker.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<div id="metadata">
|
25
25
|
<dl>
|
26
26
|
<dt class="modified-date">Last Modified</dt>
|
27
|
-
<dd class="modified-date">
|
27
|
+
<dd class="modified-date">Thu Nov 03 10:10:42 -0400 2011</dd>
|
28
28
|
|
29
29
|
|
30
30
|
<dt class="requires">Requires</dt>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: resque_scheduler.rb [ResqueUi 3.1.
|
9
|
+
<title>File: resque_scheduler.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: chained_job_with_status.rb [ResqueUi 3.1.
|
9
|
+
<title>File: chained_job_with_status.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: job_with_status.rb [ResqueUi 3.1.
|
9
|
+
<title>File: job_with_status.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: status.rb [ResqueUi 3.1.
|
9
|
+
<title>File: status.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" />
|
12
12
|
|
data/rdoc/lib/resque_ui_rb.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
8
8
|
|
9
|
-
<title>File: resque_ui.rb [ResqueUi 3.1.
|
9
|
+
<title>File: resque_ui.rb [ResqueUi 3.1.7]</title>
|
10
10
|
|
11
11
|
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />
|
12
12
|
|
data/resque_ui.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{resque_ui}
|
8
|
-
s.version = "3.1.
|
8
|
+
s.version = "3.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{2011-11-
|
11
|
+
s.authors = [%q{Kevin Tyll}]
|
12
|
+
s.date = %q{2011-11-03}
|
13
13
|
s.description = %q{A Rails UI for Resque for managing workers, failures and schedules.}
|
14
14
|
s.email = %q{kevintyll@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -121,8 +121,8 @@ Gem::Specification.new do |s|
|
|
121
121
|
"test/test_helper.rb"
|
122
122
|
]
|
123
123
|
s.homepage = %q{https://github.com/kevintyll/resque_ui}
|
124
|
-
s.require_paths = [
|
125
|
-
s.rubygems_version = %q{1.
|
124
|
+
s.require_paths = [%q{lib}]
|
125
|
+
s.rubygems_version = %q{1.8.9}
|
126
126
|
s.summary = %q{A Rails engine port of the Sinatra app that is included in Chris Wanstrath's resque gem.}
|
127
127
|
|
128
128
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: resque_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.1.
|
5
|
+
version: 3.1.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin Tyll
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-11-03 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rails
|
@@ -180,7 +179,6 @@ files:
|
|
180
179
|
- resque_ui.gemspec
|
181
180
|
- test/resque_ui_test.rb
|
182
181
|
- test/test_helper.rb
|
183
|
-
has_rdoc: true
|
184
182
|
homepage: https://github.com/kevintyll/resque_ui
|
185
183
|
licenses: []
|
186
184
|
|
@@ -204,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
202
|
requirements: []
|
205
203
|
|
206
204
|
rubyforge_project:
|
207
|
-
rubygems_version: 1.
|
205
|
+
rubygems_version: 1.8.9
|
208
206
|
signing_key:
|
209
207
|
specification_version: 3
|
210
208
|
summary: A Rails engine port of the Sinatra app that is included in Chris Wanstrath's resque gem.
|