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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36f269a9187cd360dd8393dd5fef00396b2f85ed
4
- data.tar.gz: ec0af2925a2258dbca828bfb2b8ad91c71b9a412
3
+ metadata.gz: 5ca85781f7ef90ef2a9f22d291cbbc934e58e13c
4
+ data.tar.gz: 6f661d24f2c6804b93df589e37bf6024a1077fda
5
5
  SHA512:
6
- metadata.gz: 1f6d3ffd5da1bcc3f2953236d3853c098755f9f27e8a15fa57f80f349bd1e27719f52c537e72aeb925538f3facf2b161db4e39f2a9020b103e64e13cde29df7f
7
- data.tar.gz: 8bc91ee79a640e5bda063b0058eeacccfe8ac15d50ac984606bf7e2d81aaa67d8fe1259d4f5046cd0077d3f693f0001660f7a0868bddd55dfd682edac3975a1f
6
+ metadata.gz: f3bdf15f517040645ac3c3e28c5feef804dcf6aae0a577550345036dd87daf9e771925a498c0bb545b94ea1136e349ec81a1e6021228e135d2153e7c378857fd
7
+ data.tar.gz: fc4e0d15560841bce7bec4b4ecfef8350c6ec24a2eee9bfa6e50ae8b3d3f93f7e57e28a25e560631a627bc6a2b6cac9bcbc9992826970295e36f7084d137c23f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.6.1
2
+ -----
3
+
4
+ - Fix manual triggering of jobs with #perform arguments.
5
+ - Require 'sidetiq' in 'sidetiq/web'.
6
+
1
7
  0.6.0
2
8
  -----
3
9
 
data/examples/config.ru CHANGED
@@ -3,7 +3,6 @@ require 'sidetiq'
3
3
 
4
4
  require 'sidekiq/web'
5
5
  require 'sidetiq/web'
6
- require 'sidetiq/lock/watcher'
7
6
 
8
7
  require './workers/simple.rb'
9
8
  require './workers/failing.rb'
data/examples/server.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'sidekiq'
4
4
  require 'sidetiq'
5
- require 'sidetiq/lock/watcher'
6
5
 
7
6
  require_relative 'workers/simple'
8
7
  require_relative 'workers/failing'
@@ -8,7 +8,7 @@ module Sidetiq
8
8
  MINOR = 6
9
9
 
10
10
  # Public: Sidetiq patch level.
11
- PATCH = 0
11
+ PATCH = 1
12
12
 
13
13
  # Public: Sidetiq version suffix.
14
14
  SUFFIX = nil
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.perform_async
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidetiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Svensson