resque 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of resque might be problematic. Click here for more details.
- data/.gitignore +1 -0
- data/CONTRIBUTORS +14 -0
- data/HISTORY.md +12 -0
- data/README.markdown +3 -0
- data/Rakefile +2 -0
- data/bin/resque-web +14 -40
- data/config.ru +3 -3
- data/deps.rip +1 -0
- data/lib/resque/failure/redis.rb +1 -1
- data/lib/resque/server.rb +9 -1
- data/lib/resque/server/views/layout.erb +3 -6
- data/lib/resque/server/views/stats.erb +2 -2
- data/lib/resque/version.rb +1 -1
- metadata +23 -2
data/.gitignore
CHANGED
data/CONTRIBUTORS
ADDED
data/HISTORY.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 1.3.0 (2010-01-11)
|
2
|
+
|
3
|
+
* Use Vegas for resque-web
|
4
|
+
* Web Bugfix: Show proper date/time value for failed_at on Failures
|
5
|
+
* Web Bugfix: Make the / route more flexible
|
6
|
+
* Add Resque::Server.tabs array (so plugins can add their own tabs)
|
7
|
+
* Start using [Semantic Versioning](http://semver.org/)
|
8
|
+
|
9
|
+
## 1.2.4 (2009-12-15)
|
10
|
+
|
11
|
+
* Web Bugfix: fix key links on stat page
|
12
|
+
|
1
13
|
## 1.2.3 (2009-12-15)
|
2
14
|
|
3
15
|
* Bugfix: Fixed `rand` seeding in child processes.
|
data/README.markdown
CHANGED
@@ -722,6 +722,8 @@ Meta
|
|
722
722
|
* Chat: <irc://irc.freenode.net/resque>
|
723
723
|
* Gems: <http://gemcutter.org/gems/resque>
|
724
724
|
|
725
|
+
This project uses [Semantic Versioning][sv].
|
726
|
+
|
725
727
|
|
726
728
|
Author
|
727
729
|
------
|
@@ -731,3 +733,4 @@ Chris Wanstrath :: chris@ozmm.org :: @defunkt
|
|
731
733
|
[0]: http://github.com/blog/542-introducing-resque
|
732
734
|
[1]: http://help.github.com/forking/
|
733
735
|
[2]: http://github.com/defunkt/resque/issues
|
736
|
+
[sv]: http://semver.org/
|
data/Rakefile
CHANGED
data/bin/resque-web
CHANGED
@@ -1,44 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
|
4
|
+
begin
|
5
|
+
require 'vegas'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'vegas'
|
9
|
+
end
|
10
|
+
require 'resque/server'
|
4
11
|
|
5
|
-
if `which rackup`.empty?
|
6
|
-
abort "** Can't find `rackup` in PATH."
|
7
|
-
end
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
Ruby options:
|
16
|
-
-e, --eval LINE evaluate a LINE of code
|
17
|
-
-d, --debug set debugging flags (set $DEBUG to true)
|
18
|
-
-w, --warn turn warnings on for your script
|
19
|
-
-I, --include PATH specify $LOAD_PATH (may be used more than once)
|
20
|
-
-r, --require LIBRARY require the library, before executing your script
|
21
|
-
Rack options:
|
22
|
-
-s, --server SERVER serve using SERVER (webrick/mongrel)
|
23
|
-
-o, --host HOST listen on HOST (default: 0.0.0.0)
|
24
|
-
-p, --port PORT use PORT (default: 9292)
|
25
|
-
-E, --env ENVIRONMENT use ENVIRONMENT for defaults (default: development)
|
26
|
-
-D, --daemonize run daemonized in the background
|
27
|
-
-P, --pid FILE file to store PID (default: rack.pid)
|
28
|
-
Common options:
|
29
|
-
-h, --help Show this message
|
30
|
-
--version Show version
|
31
|
-
usage
|
32
|
-
else
|
33
|
-
if !ENV['RESQUECONFIG']&&ARGV[-1]&&ARGV[-1][0]!=?-&&(ARGV[-2]?ARGV[-2][0]!=?-:true)
|
34
|
-
if File.file?(file = File.expand_path(ARGV[-1]))
|
35
|
-
ARGV.delete_at(-1)
|
36
|
-
ENV['RESQUECONFIG'] = file
|
37
|
-
else
|
38
|
-
abort "** Can't find #{file}"
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
ARGV.push File.expand_path(File.dirname(__FILE__) + "/../config.ru")
|
43
|
-
exec "rackup", *ARGV
|
44
|
-
end
|
13
|
+
Vegas::Runner.new(Resque::Server, 'resque-web', {
|
14
|
+
:before_run => lambda {|v|
|
15
|
+
path = (ENV['RESQUECONFIG'] || v.args.first).strip
|
16
|
+
load path if path
|
17
|
+
}
|
18
|
+
})
|
data/config.ru
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'logger'
|
3
3
|
|
4
|
-
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')
|
4
|
+
$LOAD_PATH.unshift ::File.expand_path(::File.dirname(__FILE__) + '/lib')
|
5
5
|
require 'resque/server'
|
6
6
|
|
7
7
|
# Set the RESQUECONFIG env variable if you've a `resque.rb` or similar
|
8
8
|
# config file you want loaded on boot.
|
9
|
-
if ENV['RESQUECONFIG'] && File.exists?(File.expand_path(ENV['RESQUECONFIG']))
|
10
|
-
load File.expand_path(ENV['RESQUECONFIG'])
|
9
|
+
if ENV['RESQUECONFIG'] && ::File.exists?(::File.expand_path(ENV['RESQUECONFIG']))
|
10
|
+
load ::File.expand_path(ENV['RESQUECONFIG'])
|
11
11
|
end
|
12
12
|
|
13
13
|
use Rack::ShowExceptions
|
data/deps.rip
CHANGED
data/lib/resque/failure/redis.rb
CHANGED
data/lib/resque/server.rb
CHANGED
@@ -41,6 +41,10 @@ module Resque
|
|
41
41
|
"<li #{class_if_current(dname)}><a href='#{url dname}'>#{name}</a></li>"
|
42
42
|
end
|
43
43
|
|
44
|
+
def tabs
|
45
|
+
Resque::Server.tabs
|
46
|
+
end
|
47
|
+
|
44
48
|
def redis_get_size(key)
|
45
49
|
case Resque.redis.type(key)
|
46
50
|
when 'none'
|
@@ -102,7 +106,7 @@ module Resque
|
|
102
106
|
end
|
103
107
|
|
104
108
|
# to make things easier on ourselves
|
105
|
-
get "
|
109
|
+
get "/?" do
|
106
110
|
redirect url(:overview)
|
107
111
|
end
|
108
112
|
|
@@ -170,5 +174,9 @@ module Resque
|
|
170
174
|
def resque
|
171
175
|
Resque
|
172
176
|
end
|
177
|
+
|
178
|
+
def self.tabs
|
179
|
+
@tabs ||= ["Overview", "Working", "Failed", "Queues", "Workers", "Stats"]
|
180
|
+
end
|
173
181
|
end
|
174
182
|
end
|
@@ -11,12 +11,9 @@
|
|
11
11
|
<body>
|
12
12
|
<div class="header">
|
13
13
|
<ul class='nav'>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%= tab "Queues" %>
|
18
|
-
<%= tab "Workers" %>
|
19
|
-
<%= tab "Stats" %>
|
14
|
+
<% tabs.each do |tab_name| %>
|
15
|
+
<%= tab tab_name %>
|
16
|
+
<% end %>
|
20
17
|
</ul>
|
21
18
|
</div>
|
22
19
|
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</tr>
|
36
36
|
<% end %>
|
37
37
|
</table>
|
38
|
-
|
38
|
+
|
39
39
|
<% elsif params[:id] == 'keys' %>
|
40
40
|
|
41
41
|
<h1>Keys owned by <%= resque %></h1>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
<% for key in resque.keys.sort %>
|
50
50
|
<tr>
|
51
51
|
<th>
|
52
|
-
<a href="/stats/keys
|
52
|
+
<a href="<%=u "/stats/keys/#{key}" %>"><%= key %></a>
|
53
53
|
</th>
|
54
54
|
<td><%= resque.redis.type key %></td>
|
55
55
|
<td><%= redis_get_size key %></td>
|
data/lib/resque/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-11 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,6 +32,26 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "0"
|
34
34
|
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: vegas
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.1.2
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: sinatra
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.9.2
|
54
|
+
version:
|
35
55
|
- !ruby/object:Gem::Dependency
|
36
56
|
name: jeweler
|
37
57
|
type: :development
|
@@ -55,6 +75,7 @@ extra_rdoc_files:
|
|
55
75
|
files:
|
56
76
|
- .gitignore
|
57
77
|
- .kick
|
78
|
+
- CONTRIBUTORS
|
58
79
|
- HISTORY.md
|
59
80
|
- LICENSE
|
60
81
|
- README.markdown
|