threasy 0.4.0 → 0.4.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: ec726270eb6e569d255112041fd86e32edba66a7
4
- data.tar.gz: fc7b534b55f290a4f74de5559488a2496b0a19d6
3
+ metadata.gz: b1bc950437e631aa8c150efa45db53103b63c72a
4
+ data.tar.gz: 3b9635b78869d69cb260f77cf63242055b3effab
5
5
  SHA512:
6
- metadata.gz: 37aea98e1bf6102d0bd31a9c9e312ce5c8df512c18cbf66abcdb755af3997b0aa61cdf014ed91768ab8c063ad0801345eb0ed463dbfbe20b9e87480718aa56f7
7
- data.tar.gz: e2be7cc6c78f8e06d81ecc6ed18426fdbfaf63eaf59ccc2192e856252f3f6f5b798b029e25f8203277e4a9b08667c99dbfe2c5d7ebd37c159e274d83eb739dac
6
+ metadata.gz: 45c57665f96db2520e878aa5e43145ee16f0f6165109c2e8ffcc5a181e82bf7cdda02aae55c24fd47ad15c19698f944a51fd10f1caa8069b47e0d03af860b60b
7
+ data.tar.gz: 09223ebffbaccd54f059ab5dce971fd96c03fecf9f31d5cdf67890aa720f5e12524e16d8fb819a202d545b74822cdb07407fb4b9134e149b406a43f6a148ed52
@@ -24,7 +24,7 @@ module Threasy
24
24
  end
25
25
 
26
26
  def repeat?
27
- !! repeat
27
+ repeat && times_remaining?
28
28
  end
29
29
 
30
30
  def once?
@@ -48,11 +48,9 @@ module Threasy
48
48
  end
49
49
 
50
50
  def work!
51
- return unless times_remaining?
52
-
53
51
  if once? || overdue < max_overdue
54
- work.enqueue job
55
- self.times -= 1 if times
52
+ work.enqueue(job) if times_remaining?
53
+ self.times -= 1 unless times.nil?
56
54
  end
57
55
 
58
56
  self.at = at + repeat if repeat?
@@ -1,3 +1,3 @@
1
1
  module Threasy
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threasy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Zulauf