ductwork 0.9.2 → 0.11.0

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
  SHA256:
3
- metadata.gz: 12b1ac1f92bb882fb50f8d98eb10f413b42633450afbaba8693d41f151adbd1c
4
- data.tar.gz: fedc0af8890f43b0993522059d9683683ae39ba3c754c9a2776e3a38d3238c0d
3
+ metadata.gz: a8865aef62511e2f94cd1400996127785cc5d46d9f2b16b00685145308addae3
4
+ data.tar.gz: f46683206d866c499f6f7eec03b5334038c77cf4078c7f78e150de11bd40b582
5
5
  SHA512:
6
- metadata.gz: 192e6908c3013ca06eb75a941c8c1bcbfa8cccd5e8bec2f9d81afeab1e9fd2c4916049828a34d26d60b0685396c88b55b68ffb62b7df841325ebff65e9a240ca
7
- data.tar.gz: 574be6981be186e5fc0ee1494317e5a44d66f63e1587bf49cc90efd8872fa05e80b9df7a412f0ecc6d4ec35d6e6f666e81bb2436f070994d3fab53dad095fcb3
6
+ metadata.gz: '08b1731d7f186650a6de90dad1b3ec3f797bddd55f03aab5d1812b7cf1476ec563d3f74537b04622778d3e3cd41afae2b38152805aa6d4d796764469f72703e7'
7
+ data.tar.gz: 6cc3908017094ad58f96c6db69cafca8b585e6f45217821f27559a7a7e47f59b8017a4d0fc87af4ea83286aa1aa0502b42d0159c2e1f6e54535296cecdd8149e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Ductwork Changelog
2
2
 
3
+ ## [0.11.0]
4
+
5
+ - feat: expose `job` attribute during claim and execution in job worker
6
+
7
+ ## [0.10.0]
8
+
9
+ - chore: update thread health-check logging
10
+
3
11
  ## [0.9.2]
4
12
 
5
13
  - fix: correctly set last node to node id instead of class name
@@ -3,7 +3,7 @@
3
3
  module Ductwork
4
4
  module Processes
5
5
  class JobWorker
6
- attr_reader :thread, :last_hearthbeat_at
6
+ attr_reader :thread, :last_hearthbeat_at, :job
7
7
 
8
8
  def initialize(pipeline, id)
9
9
  @pipeline = pipeline
@@ -47,7 +47,8 @@ module Ductwork
47
47
  role: :job_worker,
48
48
  pipeline: pipeline
49
49
  )
50
- job = Ductwork.wrap_with_app_executor do
50
+
51
+ @job = Ductwork.wrap_with_app_executor do
51
52
  Job.claim_latest(pipeline)
52
53
  end
53
54
 
@@ -55,6 +56,8 @@ module Ductwork
55
56
  Ductwork.wrap_with_app_executor do
56
57
  job.execute(pipeline)
57
58
  end
59
+
60
+ @job = nil
58
61
  else
59
62
  Ductwork.logger.debug(
60
63
  msg: "No job to claim, looping",
@@ -77,17 +77,23 @@ module Ductwork
77
77
 
78
78
  def check_thread_health
79
79
  Ductwork.logger.debug(
80
- msg: "Attempting to synchronize threads",
80
+ msg: "Checking thread health",
81
81
  role: :job_worker_runner,
82
82
  pipeline: pipeline
83
83
  )
84
84
  job_workers.each do |job_worker|
85
85
  if !job_worker.alive?
86
86
  job_worker.restart
87
+
88
+ Ductwork.logger.debug(
89
+ msg: "Restarted thread",
90
+ role: :job_worker_runner,
91
+ pipeline: pipeline
92
+ )
87
93
  end
88
94
  end
89
95
  Ductwork.logger.debug(
90
- msg: "Synchronizing threads timed out",
96
+ msg: "Checked thread health",
91
97
  role: :job_worker_runner,
92
98
  pipeline: pipeline
93
99
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ductwork
4
- VERSION = "0.9.2"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ductwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Ewing