solid_queue 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 553dc884dd38c24c16196da9cceb6e7b40d02bd3f5c005bc980065232b4b1682
4
- data.tar.gz: dba6309954b326305526417c05c1a5878a0195d759e8cd6fb6c4453ee61cd6c0
3
+ metadata.gz: f0d576a078aa17199edc6614015a0953027fe2660e98eab5ef31c23a7417c6e3
4
+ data.tar.gz: dfdac5d1ae0b53d48dea6e31abd70a39858cb48d41e2ef51f4db777797b5db1a
5
5
  SHA512:
6
- metadata.gz: dc6ad2d8abd513cd9f357a1190c2173c978b46dd800d1b3f4040364cd70c44b5271da7108901c67a2811586d746607eac4f999c8886a56a1942a228f0f3d1d11
7
- data.tar.gz: 999a90c18c09350609670b29bdd3f5e2596815f0a5edb194b225634b9169eca9efaf3e8efda23cfe346e6947e9477b983bbcae1a8a1adf3c6fc2ae9affd4e2ff
6
+ metadata.gz: a0583ab02da0aac3e812a9e13a3a9853aca53cd67d15cd1a8ce2d666b7f48e9c669dd52bd45a74b03b5177f2b93dd98a1d85ef9f86ab2c0b4aeb82d38f26bb3f
7
+ data.tar.gz: 6e6cdb1ad994664f8132774e2d337758a2fea55bbb46bb618acbed3319490acf23f0cf59f12a66ac7c798c55a92b69167073fe932b41a453dbdfd91189cb3ae4
@@ -4,7 +4,7 @@ module SolidQueue
4
4
  class Record < ActiveRecord::Base
5
5
  self.abstract_class = true
6
6
 
7
- connects_to **SolidQueue.connects_to if SolidQueue.connects_to
7
+ connects_to(**SolidQueue.connects_to) if SolidQueue.connects_to
8
8
 
9
9
  def self.non_blocking_lock
10
10
  if SolidQueue.use_skip_locked
@@ -67,11 +67,15 @@ module SolidQueue
67
67
  end
68
68
  end
69
69
 
70
- payload[:active_job_id] = active_job.job_id if active_job
70
+ active_job.tap do |enqueued_job|
71
+ payload[:active_job_id] = enqueued_job.job_id
72
+ end
71
73
  rescue RecurringExecution::AlreadyRecorded
72
74
  payload[:skipped] = true
75
+ false
73
76
  rescue Job::EnqueueError => error
74
77
  payload[:enqueue_error] = error.message
78
+ false
75
79
  end
76
80
  end
77
81
 
@@ -41,10 +41,6 @@ module SolidQueue::Processes
41
41
  end
42
42
  end
43
43
 
44
- def run
45
- raise NotImplementedError
46
- end
47
-
48
44
  def shutting_down?
49
45
  stopped? || (running_as_fork? && supervisor_went_away?) || finished? || !registered?
50
46
  end
@@ -29,7 +29,7 @@ module SolidQueue
29
29
  else
30
30
  FileUtils.mkdir_p File.dirname(path)
31
31
  end
32
- rescue Errno::ESRCH => e
32
+ rescue Errno::ESRCH
33
33
  # Process is dead, ignore, just delete the file
34
34
  delete
35
35
  rescue Errno::EPERM
@@ -1,3 +1,3 @@
1
1
  module SolidQueue
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rosa Gutierrez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-26 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord