resque-status 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/Rakefile +1 -1
- data/lib/resque/server/views/statuses.erb +2 -0
- data/lib/resque/status.rb +5 -2
- data/lib/resque/status_server.rb +10 -2
- data/resque-status.gemspec +4 -4
- metadata +11 -4
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
data/lib/resque/status.rb
CHANGED
@@ -7,7 +7,7 @@ module Resque
|
|
7
7
|
# the common status attributes. It also has a number of class methods for
|
8
8
|
# creating/updating/retrieving status objects from Redis
|
9
9
|
class Status < Hash
|
10
|
-
VERSION = '0.1.
|
10
|
+
VERSION = '0.1.5'
|
11
11
|
|
12
12
|
extend Resque::Helpers
|
13
13
|
|
@@ -47,7 +47,10 @@ module Resque
|
|
47
47
|
|
48
48
|
# returns a Redisk::Logger scoped to the UUID. Any options passed are passed
|
49
49
|
# to the logger initialization.
|
50
|
+
#
|
51
|
+
# Ensures that Redisk is logging to the same Redis connection as Resque.
|
50
52
|
def self.logger(uuid, options = {})
|
53
|
+
Redisk.redis = redis
|
51
54
|
Redisk::Logger.new(logger_key(uuid), options)
|
52
55
|
end
|
53
56
|
|
@@ -216,4 +219,4 @@ module Resque
|
|
216
219
|
end
|
217
220
|
|
218
221
|
end
|
219
|
-
end
|
222
|
+
end
|
data/lib/resque/status_server.rb
CHANGED
@@ -15,7 +15,7 @@ module Resque
|
|
15
15
|
app.get '/statuses/:id.js' do
|
16
16
|
@status = Resque::Status.get(params[:id])
|
17
17
|
content_type :js
|
18
|
-
@status.
|
18
|
+
@status.json
|
19
19
|
end
|
20
20
|
|
21
21
|
app.get '/statuses/:id' do
|
@@ -33,9 +33,17 @@ module Resque
|
|
33
33
|
redirect url(:statuses)
|
34
34
|
end
|
35
35
|
|
36
|
+
app.get "/statuses.poll" do
|
37
|
+
content_type "text/plain"
|
38
|
+
@polling = true
|
39
|
+
|
40
|
+
@statuses = Resque::Status.statuses
|
41
|
+
status_view(:statuses, {:layout => false})
|
42
|
+
end
|
43
|
+
|
36
44
|
app.helpers do
|
37
45
|
def status_view(filename, options = {}, locals = {})
|
38
|
-
erb(File.read(File.join(VIEW_PATH, "#{filename}.erb")), options, locals)
|
46
|
+
erb(File.read(File.join(::Resque::StatusServer::VIEW_PATH, "#{filename}.erb")), options, locals)
|
39
47
|
end
|
40
48
|
end
|
41
49
|
|
data/resque-status.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{resque-status}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Quint"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-23}
|
13
13
|
s.description = %q{resque-status is an extension to the resque queue system that provides simple trackable jobs. It provides a Resque::Status class which can set/get the statuses of jobs and a Resque::JobWithStatus class that when subclassed provides easily trackable/killable jobs.}
|
14
14
|
s.email = %q{aaron@quirkey.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.rdoc_options = ["--charset=UTF-8"]
|
41
41
|
s.require_paths = ["lib"]
|
42
42
|
s.rubyforge_project = %q{quirkey}
|
43
|
-
s.rubygems_version = %q{1.3.
|
43
|
+
s.rubygems_version = %q{1.3.7}
|
44
44
|
s.summary = %q{resque-status is an extension to the resque queue system that provides simple trackable jobs.}
|
45
45
|
s.test_files = [
|
46
46
|
"test/test_helper.rb",
|
@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
|
|
53
53
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
54
|
s.specification_version = 3
|
55
55
|
|
56
|
-
if Gem::Version.new(Gem::
|
56
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
57
|
s.add_runtime_dependency(%q<uuid>, [">= 2.0.2"])
|
58
58
|
s.add_runtime_dependency(%q<resque>, [">= 1.3.1"])
|
59
59
|
s.add_runtime_dependency(%q<redisk>, [">= 0.2.1"])
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Aaron Quint
|
@@ -14,13 +14,14 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-08-23 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: uuid
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
26
|
- - ">="
|
26
27
|
- !ruby/object:Gem::Version
|
@@ -35,6 +36,7 @@ dependencies:
|
|
35
36
|
name: resque
|
36
37
|
prerelease: false
|
37
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
38
40
|
requirements:
|
39
41
|
- - ">="
|
40
42
|
- !ruby/object:Gem::Version
|
@@ -49,6 +51,7 @@ dependencies:
|
|
49
51
|
name: redisk
|
50
52
|
prerelease: false
|
51
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
52
55
|
requirements:
|
53
56
|
- - ">="
|
54
57
|
- !ruby/object:Gem::Version
|
@@ -63,6 +66,7 @@ dependencies:
|
|
63
66
|
name: shoulda
|
64
67
|
prerelease: false
|
65
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
66
70
|
requirements:
|
67
71
|
- - ">="
|
68
72
|
- !ruby/object:Gem::Version
|
@@ -77,6 +81,7 @@ dependencies:
|
|
77
81
|
name: mocha
|
78
82
|
prerelease: false
|
79
83
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
80
85
|
requirements:
|
81
86
|
- - ">="
|
82
87
|
- !ruby/object:Gem::Version
|
@@ -125,6 +130,7 @@ rdoc_options:
|
|
125
130
|
require_paths:
|
126
131
|
- lib
|
127
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
128
134
|
requirements:
|
129
135
|
- - ">="
|
130
136
|
- !ruby/object:Gem::Version
|
@@ -132,6 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
138
|
- 0
|
133
139
|
version: "0"
|
134
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
135
142
|
requirements:
|
136
143
|
- - ">="
|
137
144
|
- !ruby/object:Gem::Version
|
@@ -141,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
148
|
requirements: []
|
142
149
|
|
143
150
|
rubyforge_project: quirkey
|
144
|
-
rubygems_version: 1.3.
|
151
|
+
rubygems_version: 1.3.7
|
145
152
|
signing_key:
|
146
153
|
specification_version: 3
|
147
154
|
summary: resque-status is an extension to the resque queue system that provides simple trackable jobs.
|