solid_queue 1.2.2 → 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: ee016dde69aa11302fc20335e657d8f65f31049ad1fad9bd56c363c8e8a6ee4d
4
- data.tar.gz: fd54a73d694f7dba45bd8a86daf426cceb4f351c87492d75130517b23929d884
3
+ metadata.gz: 5450063206508cf94195d16dfe5be8db7609b4b959a9e2e36ca7cc102b90e04b
4
+ data.tar.gz: 6b10b7ddc67fdff01b31a78e486a4ea4f351277e7f851071406237300177d614
5
5
  SHA512:
6
- metadata.gz: 4a30c8abce9f22bd28901387bbb7c0a1da41671926033f48c2f46339f3b447ae5677763f52f0b1b46801a9f3bf206834d1eae712462989bbe6a6d8daa2fd43e5
7
- data.tar.gz: 286fafe7fc7202053989993bbfc51a207b530a538f2898685482c328cfe6bf28fc3b514d4ea15c2c5fcb57cadbf010c43823fba12dd92dfc54b0b105a45f340c
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)
@@ -29,22 +29,18 @@ module SolidQueue
29
29
  end
30
30
 
31
31
  def start
32
- wrap_in_app_executor do
33
- boot
34
- run_start_hooks
32
+ boot
33
+ run_start_hooks
35
34
 
36
- start_processes
37
- launch_maintenance_task
35
+ start_processes
36
+ launch_maintenance_task
38
37
 
39
- supervise
40
- end
38
+ supervise
41
39
  end
42
40
 
43
41
  def stop
44
- wrap_in_app_executor do
45
- super
46
- run_stop_hooks
47
- end
42
+ super
43
+ run_stop_hooks
48
44
  end
49
45
 
50
46
  private
@@ -180,9 +176,11 @@ module SolidQueue
180
176
  # executions it had claimed as failed so that they can be retried
181
177
  # by some other worker.
182
178
  def handle_claimed_jobs_by(terminated_fork, status)
183
- if registered_process = SolidQueue::Process.find_by(name: terminated_fork.name)
184
- error = Processes::ProcessExitError.new(status)
185
- 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
186
184
  end
187
185
  end
188
186
 
@@ -1,3 +1,3 @@
1
1
  module SolidQueue
2
- VERSION = "1.2.2"
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.2
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-21 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