dynarex_cron 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdc7ce3471d1815443b06f59c463e6fd4044e627
4
- data.tar.gz: fd9f687da9c0b2386ed8d1dd3f7be591af338d13
3
+ metadata.gz: 7d6d831aa410f982a4d6e362fc3054e93b897198
4
+ data.tar.gz: 2b9761c099406b8e3433f30e188d0ae72b2b8cc9
5
5
  SHA512:
6
- metadata.gz: e131466356dca6d8bd81058d17ea6079dec47279bbf339dea293ce8d45a73e1f79a53d32e93899439c08d36e684c34a93ddbc87a33e5d24200768e7ab4473c74
7
- data.tar.gz: 1ae2fe7add97b0033e9dfd156d2f0c2fa7ca33facac60dff39f693fe153c46b7da031029c5422a05e8b6957c7c3c93c6077c2651f4a6d8abbdfa7af936993919
6
+ metadata.gz: c0880d7fcb65d010950510a5561306df1ea96ab96cb809d996b82e53df0d6a72a288ade8496ea3c9ee2935fd3e63e40daf1ec1227c24ea2866408a11a89d13b0
7
+ data.tar.gz: 94e202eec354151472036d76aa5a0790221514ea2a84d71119c2eb9a5f1bbb144fcf54f0ef08951964e7360bf44e3d9c64fb3bf43341e8bd0a85fcd47abad666
checksums.yaml.gz.sig CHANGED
@@ -1 +1,2 @@
1
- b p:�ì�'��X���� j�6(Dn��gyz�����+�;Q/{.k���M%kDWW��;,2��V�V��$;�͐V8>��b&p2e�ONn�uc��h7P(7� ����UM���0jW&(������8=�9�3��=��5�*$Z2q�y�e��:�\�Eu7SF�rD�A�cB�� J;�Dh8 ��[��:ocCa�� ���1��T�^��K�C�{)o���'[����� ��q��wS�0���
1
+ �ɭ�p�,YNe!�yӷ)�X'�6m|��VX���X=4�6���9z������9d;ZV��!&�:�G3-��y2K7/�8H#|��j5>2��ss\��7����uL+�;n�㶛��ss��1��{�8��A�� fl ���N]>;��!��hf�T������T+�(��v�s�,������6 ,
2
+ ��422��8!�W@�C�)�Єa�Ʉ��x��!u�W@���4(;"U��v�cl��|���Y
data.tar.gz.sig CHANGED
Binary file
data/lib/dynarex_cron.rb CHANGED
@@ -14,7 +14,7 @@ class DynarexCron
14
14
  # options: e.g. sps_address: 'sps', sps_port: '59000'
15
15
  #
16
16
  def initialize(dxfile=nil, sps_address: 'sps', sps_port: '59000', \
17
- log: nil, time_offset: 0)
17
+ log: nil, time_offset: 0, logtopic: 'DynarexCron')
18
18
 
19
19
 
20
20
  @dxfile, @sps_address, @sps_port, @log = dxfile, sps_address, sps_port, log
@@ -24,6 +24,7 @@ class DynarexCron
24
24
  @time_offset = time_offset.to_i
25
25
 
26
26
  @cron_entries = []
27
+ @logtopic = logtopic
27
28
 
28
29
 
29
30
  if @dxfile then
@@ -41,7 +42,7 @@ class DynarexCron
41
42
  @running = true
42
43
 
43
44
  if @log then
44
- @log.info 'DynarexCron/start: Time.now: ' \
45
+ @log.info @logtopic + '/start: Time.now: ' \
45
46
  + (Time.now + @time_offset).strftime(DF)
46
47
  end
47
48
 
@@ -64,7 +65,7 @@ class DynarexCron
64
65
  @buffer = buffer
65
66
 
66
67
  rescue
67
- @log.debug 'DynarexCron/start: warning: ' + ($!).inspect
68
+ @log.debug @logtopic + '/start: warning: ' + ($!).inspect
68
69
  end
69
70
 
70
71
  end
@@ -118,8 +119,8 @@ class DynarexCron
118
119
  datetime = (Time.now + @time_offset).strftime(DF)
119
120
 
120
121
  if @log then
121
- @log.info 'DynarexCron/iterate: datetime: ' + datetime
122
- @log.info 'DynarexCron/iterate: cron.to_time: ' \
122
+ @log.info @logtopic + '/iterate: datetime: ' + datetime
123
+ @log.info @logtopic + '/iterate: cron.to_time: ' \
123
124
  + h[:cron].to_time.strftime(DF)
124
125
  end
125
126
 
@@ -128,7 +129,7 @@ class DynarexCron
128
129
  begin
129
130
 
130
131
  if h[:fqm].empty? and @log then
131
- @log.debug 'DynarexCron/iterate: no h[:fqw] found ' + h.inspect
132
+ @log.debug @logtopic + '/iterate: no h[:fqw] found ' + h.inspect
132
133
  end
133
134
 
134
135
  msg = h[:fqm].gsub('!Time',Time.now.strftime("%H:%M"))
@@ -138,8 +139,8 @@ class DynarexCron
138
139
  rescue
139
140
 
140
141
  if @log then
141
- @log.debug 'DynarexCron/iterate: cron: ' + h[:cron].inspect
142
- @log.debug 'DynarexCron/iterate: h: ' + h.inspect + ' : ' \
142
+ @log.debug @logtopic + '/iterate: cron: ' + h[:cron].inspect
143
+ @log.debug @logtopic + '/iterate: h: ' + h.inspect + ' : ' \
143
144
  + ($!).inspect
144
145
  end
145
146
 
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file