dynarex_cron 0.1.2 → 0.1.3

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: feac90ae754ab23fe1bb677f772f22b7b500c173
4
- data.tar.gz: 00f0848452fcc09009017e876c92d15a5770e74e
3
+ metadata.gz: 6943dcf67933d5ce14cd92c4b8b05ef95de5ff6f
4
+ data.tar.gz: b40e7dbcf961d59ecfee9cf619e82774756dceea
5
5
  SHA512:
6
- metadata.gz: e1a0851d5ec0c01e29148ae568d131cf8e7335cd767d89100bb5ba0cf312d6037c5237b1707e72b937c869dedf48cf35a8253231263df17ee0d1c1ad333165f0
7
- data.tar.gz: d74cfb2692f012cc7ada8c9a9c350be415bcbcef64c275b8540dae46171c82aec1339c75db71cc2844cd4f8bd61e089e5adba2cc48108769e6d1489cfb8fd833
6
+ metadata.gz: 9a195712510e0be81af69007bd07511372f4e82b8d1dabfe64c7494f63f1861f7016d3f9cb5879ea8c7d14491aa3a12486ec64ded494d1df983535513c8b23c5
7
+ data.tar.gz: 9392c48400a8fabdcdb0b594a81513b75d5db972ef05cc2e1c421924f009bb777931cdbb5da5089ec4c02f699ff941f373ed112d7b243bc74b93fe836ad7f612
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/dynarex_cron.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  # file: dynarex_cron.rb
4
4
 
5
- require 'run_every'
6
5
  require 'dynarex'
7
6
  require 'chronic_cron'
8
7
  require 'simplepubsub'
@@ -19,16 +18,17 @@ class DynarexCron
19
18
  end
20
19
 
21
20
  def start
22
-
23
- RunEvery.new.minute do
21
+ puts '[' + Time.now.to_s + '] DynarexCron started'
22
+ while true
23
+ #puts Time.now.inspect
24
24
  @dynarex.to_h.each do |h|
25
25
  if h[:cron].to_time.strftime(TF) == Time.now.strftime(TF) then
26
26
  Thread.new { run(h[:job]) }
27
27
  h[:cron].next
28
28
  end
29
29
  end
30
+ sleep 60 # wait for 60 seconds
30
31
  end
31
-
32
32
  end
33
33
 
34
34
  private
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex_cron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -47,20 +47,6 @@ dependencies:
47
47
  - - '>='
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
- - !ruby/object:Gem::Dependency
51
- name: run_every
52
- requirement: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - '>='
55
- - !ruby/object:Gem::Version
56
- version: '0'
57
- type: :runtime
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - '>='
62
- - !ruby/object:Gem::Version
63
- version: '0'
64
50
  - !ruby/object:Gem::Dependency
65
51
  name: chronic_cron
66
52
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file