solid_queue 1.2.3 → 1.2.4

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: b9c40f4cc06834a2134e188e25fb6ce63b9a55818d94155cf6bac70ae99b3359
4
- data.tar.gz: 312a40d851d6f0d3fe52263f2310eb43cf2d4302aafbbac706dc55f7822c6ced
3
+ metadata.gz: 5450063206508cf94195d16dfe5be8db7609b4b959a9e2e36ca7cc102b90e04b
4
+ data.tar.gz: 6b10b7ddc67fdff01b31a78e486a4ea4f351277e7f851071406237300177d614
5
5
  SHA512:
6
- metadata.gz: 48547f088ad66bd5896876cd0ef4f2f681e2536eecde84b4ced47e3ec957db98dd72674b272dd649e348343b6cfefc466d6adf33d8c3ab538818be84bfb666c0
7
- data.tar.gz: 2a5f18f2d1f366bdd37ca7157417147fa644078ee6e7f93a757546625c68168cada47d1c15f534efed944c45641e063b180d9c55c437ecd10dd427d0e1a62853
6
+ metadata.gz: 71a4c19d255e551e3a44aa1cdc508c5cb8dee3d66ae27c5b67a7fe2aaa31f958226e2a947bba773738274f717e5f635e412da1c471a03608657fc3deead4a961
7
+ data.tar.gz: 602c99609a6b65d3edbd29c8b8c26e9eed040830a115f207c0cebe139da80c6e43ccd2c1d583f4920fc0550c546747055f7da2fa73d858b9d20b4c7e37e674a9
data/README.md CHANGED
@@ -342,7 +342,7 @@ When receiving a `QUIT` signal, if workers still have jobs in-flight, these will
342
342
 
343
343
  If processes have no chance of cleaning up before exiting (e.g. if someone pulls a cable somewhere), in-flight jobs might remain claimed by the processes executing them. Processes send heartbeats, and the supervisor checks and prunes processes with expired heartbeats. Jobs that were claimed by processes with an expired heartbeat will be marked as failed with a `SolidQueue::Processes::ProcessPrunedError`. You can configure both the frequency of heartbeats and the threshold to consider a process dead. See the section below for this.
344
344
 
345
- In a similar way, if a worker is terminated in any other way not initiated by the above signals (e.g. a worker is sent a `KILL` signal), jobs in progress will be marked as failed so that they can be inspected, with a `SolidQueue::Processes::Process::ProcessExitError`. Sometimes a job in particular is responsible for this, for example, if it has a memory leak and you have a mechanism to kill processes over a certain memory threshold, so this will help identifying this kind of situation.
345
+ In a similar way, if a worker is terminated in any other way not initiated by the above signals (e.g. a worker is sent a `KILL` signal), jobs in progress will be marked as failed so that they can be inspected, with a `SolidQueue::Processes::ProcessExitError`. Sometimes a job in particular is responsible for this, for example, if it has a memory leak and you have a mechanism to kill processes over a certain memory threshold, so this will help identifying this kind of situation.
346
346
 
347
347
 
348
348
  ### Database configuration
@@ -188,6 +188,7 @@ module SolidQueue
188
188
  if file.exist?
189
189
  ActiveSupport::ConfigurationFile.parse(file).deep_symbolize_keys
190
190
  else
191
+ puts "[solid_queue] WARNING: Provided configuration file '#{file}' does not exist. Falling back to default configuration."
191
192
  {}
192
193
  end
193
194
  end
@@ -18,17 +18,19 @@ module SolidQueue::Processes
18
18
  attr_accessor :process
19
19
 
20
20
  def register
21
- @process = SolidQueue::Process.register \
22
- kind: kind,
23
- name: name,
24
- pid: pid,
25
- hostname: hostname,
26
- supervisor: try(:supervisor),
27
- metadata: metadata.compact
21
+ wrap_in_app_executor do
22
+ @process = SolidQueue::Process.register \
23
+ kind: kind,
24
+ name: name,
25
+ pid: pid,
26
+ hostname: hostname,
27
+ supervisor: try(:supervisor),
28
+ metadata: metadata.compact
29
+ end
28
30
  end
29
31
 
30
32
  def deregister
31
- process&.deregister
33
+ wrap_in_app_executor { process&.deregister }
32
34
  end
33
35
 
34
36
  def registered?
@@ -46,7 +46,7 @@ module SolidQueue
46
46
  end
47
47
 
48
48
  def reload_tasks
49
- @configured_tasks = SolidQueue::RecurringTask.where(key: task_keys)
49
+ @configured_tasks = SolidQueue::RecurringTask.where(key: task_keys).to_a
50
50
  end
51
51
 
52
52
  def schedule(task)
@@ -176,9 +176,11 @@ module SolidQueue
176
176
  # executions it had claimed as failed so that they can be retried
177
177
  # by some other worker.
178
178
  def handle_claimed_jobs_by(terminated_fork, status)
179
- if registered_process = SolidQueue::Process.find_by(name: terminated_fork.name)
180
- error = Processes::ProcessExitError.new(status)
181
- registered_process.fail_all_claimed_executions_with(error)
179
+ wrap_in_app_executor do
180
+ if registered_process = SolidQueue::Process.find_by(name: terminated_fork.name)
181
+ error = Processes::ProcessExitError.new(status)
182
+ registered_process.fail_all_claimed_executions_with(error)
183
+ end
182
184
  end
183
185
  end
184
186
 
@@ -1,3 +1,3 @@
1
1
  module SolidQueue
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rosa Gutierrez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-28 00:00:00.000000000 Z
11
+ date: 2025-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord