sidetiq 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/examples/config.ru +0 -1
- data/examples/server.rb +0 -1
- data/lib/sidetiq/version.rb +1 -1
- data/lib/sidetiq/web.rb +15 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca85781f7ef90ef2a9f22d291cbbc934e58e13c
|
4
|
+
data.tar.gz: 6f661d24f2c6804b93df589e37bf6024a1077fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3bdf15f517040645ac3c3e28c5feef804dcf6aae0a577550345036dd87daf9e771925a498c0bb545b94ea1136e349ec81a1e6021228e135d2153e7c378857fd
|
7
|
+
data.tar.gz: fc4e0d15560841bce7bec4b4ecfef8350c6ec24a2eee9bfa6e50ae8b3d3f93f7e57e28a25e560631a627bc6a2b6cac9bcbc9992826970295e36f7084d137c23f
|
data/CHANGELOG.md
CHANGED
data/examples/config.ru
CHANGED
data/examples/server.rb
CHANGED
data/lib/sidetiq/version.rb
CHANGED
data/lib/sidetiq/web.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'sidetiq'
|
1
2
|
require 'sidekiq/web'
|
2
3
|
|
3
4
|
module Sidetiq
|
@@ -54,7 +55,20 @@ module Sidetiq
|
|
54
55
|
worker.name == name
|
55
56
|
end
|
56
57
|
|
57
|
-
worker.
|
58
|
+
case worker.instance_method(:perform).arity.abs
|
59
|
+
when 0
|
60
|
+
worker.perform_async
|
61
|
+
when 1
|
62
|
+
Sidekiq.redis do |redis|
|
63
|
+
last_run = (redis.get("sidetiq:#{worker.name}:last") || -1).to_f
|
64
|
+
worker.perform_async(last_run)
|
65
|
+
end
|
66
|
+
else
|
67
|
+
Sidekiq.redis do |redis|
|
68
|
+
last_run = (redis.get("sidetiq:#{worker.name}:last") || -1).to_f
|
69
|
+
worker.perform_async(last_run, Sidetiq.clock.gettime.to_i)
|
70
|
+
end
|
71
|
+
end
|
58
72
|
|
59
73
|
redirect "#{root_path}sidetiq"
|
60
74
|
end
|