tanga_que_extensions 0.0.13 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/periodic_job.rb +3 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b61622c360c9810a3480e9c05ae675df90c605de
4
- data.tar.gz: 0ce09f5c619f44e52ab05bb29600eede773a06a9
3
+ metadata.gz: 084c5d21009e653b064bfadae6e378e9836ef094
4
+ data.tar.gz: 60b1217de8030a6c4122753bd8cc421df7de6e26
5
5
  SHA512:
6
- metadata.gz: b510c4cadc421a48c929ee199161f652b047ac4166741fbb83f5fa6ad02baa7ab52b7befde0def07dfa968a970d1c16a2a2dd4c8ccfc64221c1fe8bfedcca833
7
- data.tar.gz: d12c915458d1edca3cdcc1c2303e2ade7b5eac32634dc80bedffd93111e49c7aa3bb69071fd7a4b570e3453ffd15d140f0012809653e2bf53d9f6c7f3c362e2f
6
+ metadata.gz: 27cd5f08d8083890d2355b1c26f2ec09e86846673ea839c3d818fe5600d89bfdbaae0a12f7040e21c1b0138d3f49f033ec2eb9d294c360ec9e5d502f293b6f4f
7
+ data.tar.gz: b897a53b33275bc68552993f600a171182c2a502d085b0bd2561c4a45344c37f7822e2288dfd2b141a53b9549e6f3cd1fe310e43795e95d5920122a9e0e52046
data/lib/periodic_job.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  class Que::PeriodicJob < Que::Job
2
2
  INTERVAL = 60
3
3
  DELAY = 0
4
+ RESET_INTERVALS = false
4
5
  attr_reader :start_at, :end_at, :run_again_at, :time_range
5
6
  def _run
6
7
  args = attrs[:args].first || {}
@@ -16,6 +17,8 @@ class Que::PeriodicJob < Que::Job
16
17
  @end_at = @start_at + self.class::INTERVAL
17
18
  end
18
19
 
20
+ @end_at = Time.now if self.class::RESET_INTERVALS
21
+
19
22
  @run_again_at = @end_at
20
23
  @time_range = @start_at...@end_at
21
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanga_que_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Van Dyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: que
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.4.5.1
119
+ rubygems_version: 2.5.1
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: job scheduling stuff for tanga