tanga_que_extensions 0.0.3 → 0.0.4

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 +2 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa8f04e9cac8d8598a161af08d8d811c8a28a494
4
- data.tar.gz: cf99fbfbe31e7755c51288d54bfb03fdec426e4d
3
+ metadata.gz: 2eb174dd8964fc6e957f6660ce00d1dbfddd2f11
4
+ data.tar.gz: fd98ac99df47dc27d19327f395ef6d82f7dec6db
5
5
  SHA512:
6
- metadata.gz: 66a1aa40c78a817a290cbb25067c48213ec80eaceb0ccb32121bf5deabb41e737f8bf20350c696bc8c7361b1c981f04b075aaa4bff608580c9969980f47188ea
7
- data.tar.gz: 38e544c730883315262454b6d92cf31026bf9abda02cf0a7e7a3ec10ae728f5d84a5610ea46c61f161aff443253ea37afa2ffb6ee6471a2cae51a4bc0766931c
6
+ metadata.gz: 08016b7ba01df2c8385bd50f1554a05ccbe805400f5ccfd5937853922e7baf974cd2cf7997659319b4055eb73c23e3f39729bed7d250f7854909ae7944dcbd7c
7
+ data.tar.gz: 1d07473309ebd264e67887cf9f161e16f3949ba9f9357f9be99c5aa7bf1d03e5e124d148915499b4f704f28aad527b34d105e61551c01bf0e08a732d870f3d40
data/lib/periodic_job.rb CHANGED
@@ -11,19 +11,18 @@ class Que::PeriodicJob < Que::Job
11
11
  if start_at.present? && end_at.present?
12
12
  @start_at = Time.parse(start_at)
13
13
  @end_at = Time.parse(end_at)
14
- @run_again_at = @end_at + self.class::INTERVAL
15
14
  else
16
15
  @start_at = Time.current
17
16
  @end_at = @start_at + self.class::INTERVAL
18
- @run_again_at = @end_at
19
17
  end
20
18
 
19
+ @run_again_at = @end_at
21
20
  @time_range = @start_at...@end_at
22
21
 
23
22
  super
24
23
 
25
24
  args['start_at'] = @end_at
26
- args['end_at'] = @run_again_at
25
+ args['end_at'] = @end_at + self.class::INTERVAL
27
26
 
28
27
  Que::Migrations.transaction do
29
28
  self.class.enqueue(args, run_at: @run_again_at + self.class::DELAY)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanga_que_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter van Wesep