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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5450063206508cf94195d16dfe5be8db7609b4b959a9e2e36ca7cc102b90e04b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6b10b7ddc67fdff01b31a78e486a4ea4f351277e7f851071406237300177d614
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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:: 
     | 
| 
      
 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 
     | 
    
         
            -
                     
     | 
| 
       22 
     | 
    
         
            -
                       
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
      
 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?
         
     | 
| 
         @@ -29,22 +29,18 @@ module SolidQueue 
     | 
|
| 
       29 
29 
     | 
    
         
             
                end
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
                def start
         
     | 
| 
       32 
     | 
    
         
            -
                   
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                    run_start_hooks
         
     | 
| 
      
 32 
     | 
    
         
            +
                  boot
         
     | 
| 
      
 33 
     | 
    
         
            +
                  run_start_hooks
         
     | 
| 
       35 
34 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
      
 35 
     | 
    
         
            +
                  start_processes
         
     | 
| 
      
 36 
     | 
    
         
            +
                  launch_maintenance_task
         
     | 
| 
       38 
37 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                  end
         
     | 
| 
      
 38 
     | 
    
         
            +
                  supervise
         
     | 
| 
       41 
39 
     | 
    
         
             
                end
         
     | 
| 
       42 
40 
     | 
    
         | 
| 
       43 
41 
     | 
    
         
             
                def stop
         
     | 
| 
       44 
     | 
    
         
            -
                   
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       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 
     | 
    
         
            -
                     
     | 
| 
       184 
     | 
    
         
            -
                       
     | 
| 
       185 
     | 
    
         
            -
             
     | 
| 
      
 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 
     | 
    
         | 
    
        data/lib/solid_queue/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-30 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activerecord
         
     |