jober 0.3.27 → 0.3.28

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: 567c60c1c378f26f81a9504ee62d062b2e5d24a8
4
- data.tar.gz: 927f44673a76879c1276cf0bafc9d47e8d0ace77
3
+ metadata.gz: 9ebb1d58780f3ccb1bb5b16f58d165224647804a
4
+ data.tar.gz: 9f198e9553a3ebe5f179431e0b1465171a6c543c
5
5
  SHA512:
6
- metadata.gz: 03da0d59d6a179824ba02fd25609bfa977bb1562318317bc7676a48edf64d6a1c9c1ff919d7cac890be9e4c463d6354b1527909a3f2b74dce4e1860ecceea0f4
7
- data.tar.gz: edc9c8bd869eba4c19466ecafcff23f1616b7e0b92718619da43cb320409177026f69b04dd69f3fe3a47dfea1f76d13451c4c980cc1dd5da7a0ac6ef0ac3f2de
6
+ metadata.gz: 7559fcf08a3eaff1f5c583c903e739f4d37da88060d28d19fcb6294103b4131ef0b74c13e62d6b4a648163c05033d7e39f0b21d6f2869ae9e18751c4e148aa1c
7
+ data.tar.gz: 3f504c1ba440f5292d9edfb77b78a15cf00d06fa67cb185cb8d9ab80f084981f48ab3d63fc85c41ef722c1b0fe1967a3c8ac0818917cb8893046f511853346b2
@@ -107,10 +107,12 @@ module Jober
107
107
  started = klass.read_timestamp(:started)
108
108
  finished = klass.read_timestamp(:finished)
109
109
  crashed = klass.read_timestamp(:crashed)
110
+ stopped = klass.read_timestamp(:stopped)
110
111
  h[klass.short_name] = {
111
112
  :started => started,
112
113
  :finished => finished,
113
114
  :crashed => crashed,
115
+ :stopped => stopped,
114
116
  :duration => (finished && started && finished >= started) ? (finished - started) : nil
115
117
  }
116
118
  end
@@ -48,6 +48,7 @@ class Jober::AbstractTask
48
48
  def execute
49
49
  info "=> start"
50
50
  @start_at = Time.now
51
+ @finished = false
51
52
  self.class.write_timestamp(:started)
52
53
  run
53
54
  self.class.del_timestamp(:crashed)
@@ -49,7 +49,11 @@ class Jober::ARLoop < Jober::Task
49
49
 
50
50
  reset_last_batch_id unless stopped
51
51
 
52
- info { "#{prefix}processed total #{cnt}" }
52
+ info { "#{prefix}processed total #{cnt} #{summary_info}" }
53
+ end
54
+
55
+ def summary_info
56
+ nil
53
57
  end
54
58
 
55
59
  def reset_last_batch_id
@@ -70,7 +70,7 @@ private
70
70
  end
71
71
 
72
72
  def not_finished_objects_names
73
- @objects.reject(&:finished).map { |o| o.class.name }
73
+ @objects.select { |o| o.finished == false }.map { |o| o.class.name }
74
74
  end
75
75
 
76
76
  def wait_for_kill(interval)
@@ -1,3 +1,3 @@
1
1
  module Jober
2
- VERSION = "0.3.27"
2
+ VERSION = "0.3.28"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jober
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.27
4
+ version: 0.3.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Konstantin Makarchev'"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-30 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis