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.
@@ -124,7 +124,7 @@ To use, you need to setup a resque-web config file:
124
124
  # ~/resque_conf.rb
125
125
  require 'resque/status_server'
126
126
 
127
- The start resque-web with your config:
127
+ Then start resque-web with your config:
128
128
 
129
129
  resque-web ~/resque_conf.rb
130
130
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
- require 'lib/resque/status'
3
+ require File.join(File.expand_path('.'), 'lib/resque/status')
4
4
  require 'resque/tasks'
5
5
 
6
6
  begin
@@ -39,6 +39,8 @@
39
39
  <% end %>
40
40
  </table>
41
41
 
42
+ <%= poll %>
43
+
42
44
  <script type="text/javascript" charset="utf-8">
43
45
  jQuery(function($) {
44
46
 
@@ -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.4'
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
@@ -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.to_json
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
 
@@ -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.4"
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-06-06}
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.6}
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::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
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
- - 4
9
- version: 0.1.4
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-06-06 00:00:00 -07:00
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.6
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.