sidekiq-amigo 1.4.1 → 1.4.2

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: defd2060d1c4a56780815bbaff9cfc54169ed12857fc5c1e20a075a5ea60ee8d
4
- data.tar.gz: 1cefc43ca64867f333d5706c5f2df3998a3fac294d957ccdf95f05763589d1aa
3
+ metadata.gz: d11b55a48aa6ca5d7da7217b242c10d13475138071ea22920adcd19a5c8569b2
4
+ data.tar.gz: 7d6166c366e1299b27e7128ce2db12792ef4cf74a57e932240cf7b288c49827c
5
5
  SHA512:
6
- metadata.gz: fde4becc89be41126f447ce282a9c6ccbe5adb05b979cc6dbea455d7bd7735043001115722450b412434253a23dc0b80bab6766b43804ad58698d0eddfd6713b
7
- data.tar.gz: 43209e4289474df8d62bc1d8052869df1cd7c375df921ead70f5aeb69f03be79dbaba53f33b1f04d66153681fd0f6e92a598176a3e7261718cda972306b571af
6
+ metadata.gz: 61b2bfef602cb1afc8dd06715f717349850065aad462dc4b1a2f39fd4307f96d0d72aefa47b42c3223d71140cb9aee2497522b0efd3063129286a4d2649acb1a
7
+ data.tar.gz: 17a639b371af4fb0a42d34fa5bc9358ca4daff76790c70081d463442bdeb3e3d33f7c4959c3e48e2bc59b2d3ad1ae62c872c6afb7de9ba529deef3854ea85c47
data/lib/amigo/retry.rb CHANGED
@@ -52,6 +52,12 @@ module Amigo
52
52
  end
53
53
  end
54
54
 
55
+ # Raise this error to finish the job. Usually used when there is a fatal error
56
+ # from deep in a job and they want to jump out of the whole thing.
57
+ # Usually you should log before raising this!
58
+ class Quit < Error
59
+ end
60
+
55
61
  class ServerMiddleware
56
62
  def call(worker, job, _queue)
57
63
  yield
@@ -61,6 +67,9 @@ module Amigo
61
67
  handle_die(worker, job, e)
62
68
  rescue Amigo::Retry::OrDie => e
63
69
  handle_retry_or_die(worker, job, e)
70
+ rescue Amigo::Retry::Quit
71
+ Sidekiq.logger.info("job_quit")
72
+ return
64
73
  end
65
74
 
66
75
  def handle_retry(worker, job, e)
data/lib/amigo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Amigo
4
- VERSION = "1.4.1"
4
+ VERSION = "1.4.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-amigo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lithic Technology
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq