resque-retry 1.5.0 → 1.7.6

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
- SHA1:
3
- metadata.gz: e13254ff1b1a5e06977bbbbfa6a28843629f2133
4
- data.tar.gz: e9ebf7d623865a0d067c060a804ccae233a34728
2
+ SHA256:
3
+ metadata.gz: bcd42f2b0761226dd2cfa5f9c9d4ff336cda1be0f6acf972ae15cd553f88fa0b
4
+ data.tar.gz: d65b4261a3ff1068f9880739ea1f4647c10be957511840203331f714cb8281dc
5
5
  SHA512:
6
- metadata.gz: fa3fba3ab9b3945a9b9de6cd3f16a59ce85ac8365d5ac2fc7c962573e74b0236cc2e0526c0435f925c22a7648aefa0fa9f6dc9015ff9a415cb36137b2f239ff7
7
- data.tar.gz: 30220fc7c9f30c3b7c0fa63105f86dbcc4c10f59e7cc1bd0e638581b87abf320d5fdae7deb0c9aadbe327f6c0af501fe5bf76842d6f488e15405ded60222af2f
6
+ metadata.gz: 78c8fccf7a670f1fc0246d7e8862941eae3fb2bda8ea4d11fb1bea2a5890ed1867f50ff9389a752f3383bf5383783b32e3f63c5ef623909a28aaeba62f4576a2
7
+ data.tar.gz: 8e3e0ed80d154282e6dddd85b8b7b95b22949d580ad6c0c7a0fc9c3a16475dca861320f919db0f2ddf6b8dca78e8bdd846a48b86db6a5761848d6d4fcb7012a4
@@ -0,0 +1,24 @@
1
+ on: [push, pull_request]
2
+
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ services:
7
+ redis:
8
+ image: redis
9
+ ports:
10
+ - 6379:6379
11
+ strategy:
12
+ matrix:
13
+ ruby-version: [2.7, 2.6]
14
+
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - name: Set up Ruby ${{ matrix.ruby-version }}
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby-version }}
21
+ - name: Install dependencies
22
+ run: bundle install
23
+ - name: Run tests
24
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -14,3 +14,5 @@ tags.*
14
14
  *.gem
15
15
  .ruby-version
16
16
  .ruby-gemset
17
+ .tags
18
+ dump.rdb
data/HISTORY.md CHANGED
@@ -1,4 +1,69 @@
1
- ## HEAD
1
+ # 1.7.6 (2021-08-06)
2
+
3
+ * Fix Redis 4.3 breaking saving job failures with multiple failure backend
4
+ * Disable verbose logging by default during test-runs
5
+ * Remove support for ruby < 2.6
6
+
7
+ # 1.7.5 (2021-08-06)
8
+
9
+ * Support `retry_delay` methods with different arity
10
+ * Switch over to _GitHub_ CI for PR test-execution
11
+
12
+ # 1.7.4 (2020-10-09)
13
+
14
+ * Rework how the default `retry_limit` is calculated
15
+ * Numerous documentation updates
16
+
17
+ # 1.7.3 (2019-11-21)
18
+
19
+ * Do not crash if job class is not found on the resque-web server
20
+
21
+ # 1.7.2 (2019-11-21)
22
+
23
+ * Address part 2 of issue #158
24
+
25
+ # 1.7.1 (2019-07-10)
26
+
27
+ * Prevent `NoMethodError` when calculating `retry_delay`
28
+
29
+ # 1.7.0 (2019-06-15)
30
+
31
+ !!! [Potential] breaking changes -- details below !!!
32
+
33
+ * Remove support for `args_for_retry` -- it has been deprecated for almost 5
34
+ years
35
+ * Work w/ shallow-clone(s) of `args` in `MultipleWithRetrySuppression#save` and
36
+ `Retry.retry_args`
37
+ * Remove deprecated options from `Gem::Specification`
38
+ * Clean-up formatting in HISTORY.md
39
+
40
+ # 1.6.0 (2019-04-21)
41
+
42
+ * Clean-up / refactoring in preparation for a release (`ruby` deprecations,
43
+ etc.)
44
+ * Loosen version requirement to allow resque v2.0 and up (@peret)
45
+
46
+ # 1.5.3 (2018-11-26)
47
+
48
+ * Monkey patch in the `requeue_queue` method onto the `Resque::Failure` backend
49
+ (this _should_ be a temporary fix)
50
+
51
+ # 1.5.2 (2018-07-16)
52
+
53
+ * Remove build support for `ruby < 2.3`, `jruby < 9.1` and `rbx`
54
+ * Improving custom retry criteria documentation (@iloveitaly)
55
+
56
+ # 1.5.1 (2018-01-07)
57
+
58
+ * Added build support for `ruby-2.2.x`, `ruby-2.3.x`, `ruby-2.4.x` and
59
+ `ruby-2.5.x`
60
+ * Dropped build support for `ruby-1.9.3` and `ruby-2.0.0` (these versions are
61
+ no unsupported)
62
+ * Fix some deprecation warnings in tests
63
+ * Feature: If no exact exception class is present in `@retry_exceptions` hash,
64
+ try to find closest superclass (@fanfilmu)
65
+ * Feature: When running Resque inline, explicitly don't try to retry, don't
66
+ touch Redis (@michaelglass)
2
67
 
3
68
  # 1.5.0 (2015-10-24)
4
69
 
@@ -20,25 +85,35 @@
20
85
  ## 1.3.0 (2014-07-25)
21
86
 
22
87
  * Adjust gem dependency on `resque-scheduler` to ~> 3.0
23
- * Deprecated: `args_for_retry` in favor of `retry_args` (will output deprecation warnings if your using the older method).
24
- * Feature: Allow changing the args for a given exception using `retry_args_for_exception` (@jonp)
88
+ * Deprecated: `args_for_retry` in favor of `retry_args` (will output deprecation
89
+ warnings if your using the older method).
90
+ * Feature: Allow changing the args for a given exception using
91
+ `retry_args_for_exception` (@jonp)
25
92
  * Feature: Allow setting `@expire_retry_key_after` on the fly (@orenmazor)
26
93
 
27
94
  ## 1.2.1 (2014-06-09)
28
95
 
29
- * Fixed Kernel.rand: "invalid argument - 0.0 (ArgumentError)" error with "ExponentialBackoff" (on "Rubinius") when `retry_delay_multiplicand_min` and `retry_delay_multiplicand_max` were the same value (@saizai)
96
+ * Fixed Kernel.rand: "invalid argument - 0.0 (ArgumentError)" error with
97
+ "ExponentialBackoff" (on "Rubinius") when `retry_delay_multiplicand_min` and
98
+ `retry_delay_multiplicand_max` were the same value (@saizai)
30
99
 
31
100
  ## 1.2.0 (2014-05-19)
32
101
 
33
- * Fixed scenario where job does not get retried correctly when `perform` is not called as expected.
34
- * Feature: Optional `@expire_retry_key_after` settings; expires retry counters from redis to save you cleaning up stale state.
35
- * Feature: Expose inner-workings of plugin through debug messages using `Resque.logger` (when logging level is Logger:DEBUG).
102
+ * Fixed scenario where job does not get retried correctly when `perform` is not
103
+ called as expected.
104
+ * Feature: Optional `@expire_retry_key_after` settings; expires retry counters
105
+ from redis to save you cleaning up stale state.
106
+ * Feature: Expose inner-workings of plugin through debug messages using
107
+ `Resque.logger` (when logging level is Logger:DEBUG).
36
108
 
37
109
  ## 1.1.4 (2014-03-17)
38
110
 
39
- * Fixed displaying retry information in resque web interface, caused by `Resque::Helpers` being deprecated.
40
- * Feature: Allow `@fatal_exceptions` as inverse of `@retry_exceptions`, when fatal exception is raised the job will be immediately fail.
41
- * Feature: Allow a random retry delay (within a range) when using exponential backoff strategy.
111
+ * Fixed displaying retry information in resque web interface, caused by
112
+ `Resque::Helpers` being deprecated.
113
+ * Feature: Allow `@fatal_exceptions` as inverse of `@retry_exceptions`, when
114
+ a fatal exception is raised the job will be immediately fail.
115
+ * Feature: Allow a random retry delay (within a range) when using exponential
116
+ backoff strategy.
42
117
 
43
118
  ## 1.1.1 (2014-03-12)
44
119
 
@@ -47,20 +122,25 @@
47
122
  ## 1.1.0 (2014-03-12)
48
123
 
49
124
  * Remove dependence on `Resque::Helpers`, will be removed in Resque 2.0
50
- * Use SHA1 for default `#retry_identifier` to prevents issues with long args gobbling space.
125
+ * Use SHA1 for default `#retry_identifier` to prevents issues with long args
126
+ gobbling space.
51
127
  * Minimum version of Resque is now ~> 1.25
52
128
 
53
129
  ## 1.0.0 (2012-09-07)
54
130
 
55
131
  ** !!! WARNING !!! INCLUDES NON-BACKWARDS COMPATIBLE CHANGES **
56
132
 
57
- * Fixed issues related to infinate job retries and v1.20.0 of resque.
58
- * Minimum gem dependency versions changed: resque >= 1.10.0, resque-scheduler >= 1.9.9
59
- * Feature: Setting `@retry_job_delegate` allows you to seperate the orignal job from a the retry job. (@tanob/@jniesen)
60
- * Web interface will work without needing to `require` your job code. (n.b. less details avaialble via web).
61
- * IMPORTANT: `#identifier` method has been namedspaced to `#retry_identifier`.
133
+ * Fixed issues related to infinite job retries and v1.20.0 of resque.
134
+ * Minimum gem dependency versions changed: resque >= 1.10.0, resque-scheduler
135
+ >= 1.9.9
136
+ * Feature: Setting `@retry_job_delegate` allows you to separate the original job
137
+ from a the retry job. (@tanob/@jniesen)
138
+ * Web interface will work without needing to `require` your job code. (n.b.
139
+ less details available via web).
140
+ * IMPORTANT: `#identifier` method has been namespaced to `#retry_identifier`.
62
141
  * Bugfix: `Remove` button on retry web interface was not working.
63
- * Feature: Allow `tagging` exceptions with a module instead of an exception class. (@tils - Tilmann Singer)
142
+ * Feature: Allow `tagging` exceptions with a module instead of an exception
143
+ class. (@tils - Tilmann Singer)
64
144
 
65
145
  ## 0.2.2 (2011-12-08)
66
146
 
@@ -68,7 +148,8 @@
68
148
 
69
149
  ## 0.2.1 (2011-11-23)
70
150
 
71
- * Bugfix: Fixed error when we tried to parse a number/string as JSON on the reque-retry web interface.
151
+ * Bugfix: Fixed error when we tried to parse a number/string as JSON on the
152
+ reque-retry web interface.
72
153
 
73
154
  ## 0.2.0 (2011-11-22)
74
155
 
@@ -78,9 +159,10 @@
78
159
  PREVIOUSLY: 0 == infinite retries.
79
160
  NOW: -1 == infinite retries; 0 == means never retry.
80
161
 
81
- * Bugfix: `#redis_retry_key` incorrectly built key when custom identifier was used. (Bogdan Gusiev)
162
+ * Bugfix: `#redis_retry_key` incorrectly built key when custom identifier was
163
+ used. (Bogdan Gusiev)
82
164
  * Feature: Ability to sleep worker after re-queuing a job, may be used to bias
83
- against the same worker from picking up the job again. (Michael Keirnan)
165
+ against the same worker from picking up the job again. (Michael Keirnan)
84
166
  * Feature: Ability to remove retry jobs using resque-web. (Thiago Morello)
85
167
  * Added example demo application.
86
168
  * Added Bundler `Gemfile`.
@@ -110,7 +192,8 @@
110
192
  ## 0.0.2 (2010-05-06)
111
193
 
112
194
  * Bugfix: Were calling non-existent method to delete redis key.
113
- * Delay no-longer falls back to `sleep`. resque-scheduler is a required dependancy.
195
+ * Delay no-longer falls back to `sleep`. resque-scheduler is a required
196
+ dependancy.
114
197
  * Redis key doesn't include ending colon `:` if no args were passed to the job.
115
198
 
116
199
  ## 0.0.1 (2010-04-27)
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  resque-retry
2
2
  ============
3
3
 
4
- A [Resque][resque] plugin. Requires Resque ~> 1.25 & [resque-scheduler][resque-scheduler] ~> 4.0.
4
+ A [Resque][resque] plugin. Requires Resque ~> 1.25 or Resque ~> 2.0 & [resque-scheduler][resque-scheduler] ~> 4.0.
5
5
 
6
6
  This gem provides retry, delay and exponential backoff support for resque jobs.
7
7
 
@@ -183,9 +183,10 @@ Here are a list of the options provided (click to jump):
183
183
  * [Job Retry Identifier/Key](#retry_key)
184
184
  * [Expire Retry Counters From Redis](#expire)
185
185
  * [Try Again and Give Up Callbacks](#callbacks)
186
+ * [Ignored Exceptions](#ignored)
186
187
  * [Debug Plugin Logging](#debug_log)
187
188
 
188
- ### <a name="retry_defaults"></a> Retry Defaults
189
+ ### <a name="retry_defaults"></a> Retry Defaults
189
190
 
190
191
  Retry the job **once** on failure, with zero delay.
191
192
  ```ruby
@@ -223,7 +224,48 @@ end
223
224
  The above modification will allow your job to retry up to 10 times, with a delay
224
225
  of 120 seconds, or 2 minutes between retry attempts.
225
226
 
226
- You can override the `retry_delay` method to set the delay value dynamically.
227
+ You can override the `retry_delay` method to set the delay value dynamically. For example:
228
+
229
+ ```ruby
230
+ class ExampleJob
231
+ extend Resque::Plugins::Retry
232
+ @queue = :testing
233
+
234
+ def self.retry_delay(exception_class)
235
+ if exception_class == SocketError
236
+ 10
237
+ else
238
+ 1
239
+ end
240
+ end
241
+
242
+ def self.perform(*args)
243
+ heavy_lifting
244
+ end
245
+ end
246
+ ```
247
+
248
+ Or, if you'd like the delay to be dependent on job arguments:
249
+
250
+ ```ruby
251
+ class ExampleJob
252
+ extend Resque::Plugins::Retry
253
+ @queue = :testing
254
+
255
+ def self.retry_delay(exception, *args)
256
+ # the delay is dependent on the arguments passed to the job
257
+ # in this case, "3" is passed as the arg and that is used as the delay
258
+ # make sure this method returns a integer
259
+ args.first.to_i
260
+ end
261
+
262
+ def self.perform(*args)
263
+ heavy_lifting
264
+ end
265
+ end
266
+
267
+ Resque.enqueue(ExampleJob, '3')
268
+ ```
227
269
 
228
270
  ### <a name="sleep"></a> Sleep After Requeuing
229
271
 
@@ -317,7 +359,12 @@ You may also want to specify different retry delays for different exception
317
359
  types. You may optionally set `@retry_exceptions` to a hash where the keys are
318
360
  your specific exception classes to retry on, and the values are your retry
319
361
  delays in seconds or an array of retry delays to be used similar to exponential
320
- backoff.
362
+ backoff. `resque-retry` will attempt to determine your retry strategy's
363
+ `@retry_limit` based on your specified `@retry_exceptions`. If, however, you
364
+ define `@retry_limit` explicitly, you should define `@retry_limit` such that it
365
+ allows for your retry strategies to complete. If your `@retry_limit` is less
366
+ than the number of desired retry attempts defined in `@retry_exceptions`, your
367
+ job will only retry `@retry_limit` times.
321
368
  ```ruby
322
369
  class DeliverSMS
323
370
  extend Resque::Plugins::Retry
@@ -332,9 +379,15 @@ end
332
379
  ```
333
380
 
334
381
  In the above example, Resque would retry any `DeliverSMS` jobs which throw a
335
- `NetworkError` or `SystemCallError`. If the job throws a `NetworkError` it
336
- will be retried 30 seconds later, if it throws `SystemCallError` it will first
337
- retry 120 seconds later then subsequent retry attempts 240 seconds later.
382
+ `NetworkError` or `SystemCallError`. The `@retry_limit` would be inferred to be
383
+ 2 based on the longest retry strategy defined in `@retry_exceptions`. If the job
384
+ throws a `NetworkError` it will be retried 30 seconds later with a subsequent
385
+ retry 30 seconds after that. If it throws a `SystemCallError` it will first
386
+ retry 120 seconds later then a subsequent retry attempt 240 seconds later. If
387
+ the job fails due to a `NetworkError`, Resque would retry the job in 30 seconds.
388
+ If the job fails a second time, this time due to a `SystemCallError`, the next
389
+ retry would occur 240 seconds later as specified in the `SystemCallError`
390
+ array defined in `@retry_exceptions`.
338
391
 
339
392
  ### <a name="fail_fast"></a> Fail Fast For Specific Exceptions
340
393
 
@@ -357,6 +410,8 @@ In the above example, Resque would retry any `DeliverSMS` jobs that throw any
357
410
  type of error other than `NetworkError`. If the job throws a `NetworkError` it
358
411
  will be marked as "failed" immediately.
359
412
 
413
+ You should use either `@fatal_exceptions` or `@retry_exceptions`. If you specify `@fatal_exceptions` the `@retry_exceptions` are ignored.
414
+
360
415
  ### <a name="custom_check"></a> Custom Retry Criteria Check Callbacks
361
416
 
362
417
  You may define custom retry criteria callbacks:
@@ -368,11 +423,11 @@ class TurkWorker
368
423
  @retry_exceptions = [NetworkError]
369
424
 
370
425
  retry_criteria_check do |exception, *args|
371
- if exception.message =~ /InvalidJobId/
372
- false # don't retry if we got passed a invalid job id.
373
- else
374
- true # its okay for a retry attempt to continue.
426
+ if exception.message =~ /SpecialErrorMessageToRetry/
427
+ return true
375
428
  end
429
+
430
+ false
376
431
  end
377
432
 
378
433
  def self.perform(job_id)
@@ -385,9 +440,18 @@ Similar to the previous example, this job will retry if either a
385
440
  `NetworkError` (or subclass) exception is thrown **or** any of the callbacks
386
441
  return true.
387
442
 
443
+ You'll want to return false by default in the `retry_criteria_check` callback since
444
+ the result of this callback is OR'd with the result of your `retry_exceptions` or
445
+ `fatal_exceptions` configuration. In other words, if you returned true your
446
+ `retry_exceptions` configuration would never be used.
447
+
448
+ If you want to AND the result of `fatal_exceptions` or `retry_exceptions` with
449
+ custom retry criteria, you'll need to implement your own logic in a `retry_criteria_check`
450
+ to check for `fatal_exceptions` or `retry_exceptions`.
451
+
388
452
  You can also register a retry criteria check with a Symbol if the method is
389
453
  already defined on the job class:
390
- ```
454
+ ```ruby
391
455
  class AlwaysRetryJob
392
456
  extend Resque::Plugins::Retry
393
457
 
@@ -397,8 +461,9 @@ class AlwaysRetryJob
397
461
  true
398
462
  end
399
463
  end
464
+ ```
400
465
 
401
- Use `@retry_exceptions = []` to **only** use your custom retry criteria checks
466
+ Use `@retry_exceptions = []` and `@fatal_exceptions = []` to **only** use your custom retry criteria checks
402
467
  to determine if the job should retry.
403
468
 
404
469
  NB: Your callback must be able to accept the exception and job arguments as
@@ -419,7 +484,7 @@ class DeliverViaSMSC
419
484
  [999, mt_message]
420
485
  end
421
486
 
422
- self.perform(smsc_id, mt_message)
487
+ def self.perform(smsc_id, mt_message)
423
488
  heavy_lifting
424
489
  end
425
490
  end
@@ -439,11 +504,52 @@ class DeliverViaSMSC
439
504
  [999, mt_message + exception.message]
440
505
  end
441
506
 
442
- self.perform(smsc_id, mt_message)
507
+ def self.perform(smsc_id, mt_message)
508
+ heavy_lifting
509
+ end
510
+ end
511
+ ```
512
+
513
+ ### Custom Retry Queues
514
+
515
+ By default, when a job is retried, it is added to the `@queue` specified in the worker. However, you may want to push the job into another (lower or higher priority) queue when the job fails. You can do this by dynamically specifying the retry queue. For example:
516
+
517
+ ```ruby
518
+ class ExampleJob
519
+ extend Resque::Plugins::Retry
520
+ @queue = :testing
521
+ @retry_delay = 1
522
+
523
+ def self.work(*args)
524
+ user_id, user_mode, record_id = *args
525
+
526
+ Resque.enqueue_to(
527
+ target_queue_for_args(user_id, user_mode, record_id),
528
+ self,
529
+ *args
530
+ )
531
+ end
532
+
533
+ def self.retry_queue(exception, *args)
534
+ target_queue_for_args(*args)
535
+ end
536
+
537
+ def self.perform(*args)
443
538
  heavy_lifting
444
539
  end
540
+
541
+ def self.target_queue_for_args(*args)
542
+ user_id, user_mode, record_id = *args
543
+
544
+ if user_mode
545
+ 'high'
546
+ else
547
+ 'low'
548
+ end
549
+ end
445
550
  end
446
551
  ```
552
+
447
553
  ### <a name="retry_key"></a> Job Retry Identifier/Key
448
554
 
449
555
  The retry attempt is incremented and stored in a Redis key. The key is built
@@ -466,7 +572,7 @@ class DeliverSMS
466
572
  "#{mobile_number}:#{mt_id}"
467
573
  end
468
574
 
469
- self.perform(mt_id, mobile_number, message)
575
+ def self.perform(mt_id, mobile_number, message)
470
576
  heavy_lifting
471
577
  end
472
578
  end
@@ -482,7 +588,7 @@ class DeliverSMS
482
588
  @queue = :mt_messages
483
589
  @expire_retry_key_after = 3600 # expire key after `retry_delay` plus 1 hour
484
590
 
485
- self.perform(mt_id, mobile_number, message)
591
+ def self.perform(mt_id, mobile_number, message)
486
592
  heavy_lifting
487
593
  end
488
594
  end
@@ -490,7 +596,7 @@ end
490
596
 
491
597
  This saves you from having to run a "house cleaning" or "errand" job.
492
598
 
493
- The expiary timeout is "pushed forward" or "touched" after each failure to
599
+ The expiry timeout is "pushed forward" or "touched" after each failure to
494
600
  ensure it's not expired too soon.
495
601
 
496
602
  ### <a name="callbacks"></a> Try Again and Give Up Callbacks
@@ -512,7 +618,7 @@ _not_ retrying, you can add a `give_up_callback`:
512
618
  ```ruby
513
619
  class LoggedJob
514
620
  extend Resque::Plugins::Retry
515
-
621
+
516
622
  give_up_callback do |exception, *args|
517
623
  logger.error("Received #{exception}, job #{self.name} failed with #{args}")
518
624
  end
@@ -524,10 +630,10 @@ the job class:
524
630
  ```ruby
525
631
  class LoggedJob
526
632
  extend Resque::Plugins::Retry
527
-
633
+
528
634
  give_up_callback :log_give_up
529
635
 
530
- def self.log_give_up(ex, *args)
636
+ def self.log_give_up(exception, *args)
531
637
  logger.error("Received #{exception}, job #{self.name} failed with #{args}")
532
638
  end
533
639
  end
@@ -557,11 +663,42 @@ Warning: Make sure your callbacks do not throw any exceptions. If they do,
557
663
  subsequent callbacks will not be triggered, and the job will not be retried
558
664
  (if it was trying again). The retry counter also will not be reset.
559
665
 
666
+ ### <a name="ignored"></a> Ignored Exceptions
667
+ If there is an exception for which you want to retry, but you don't want it to
668
+ increment your retry counter, you can add it to `@ignore_exceptions`.
669
+
670
+ One use case: Restarting your workers triggers a `Resque::TermException`. You
671
+ may want your workers to retry the job that they were working on, but without
672
+ incrementing the retry counter.
673
+
674
+ ```ruby
675
+ class RestartResilientJob
676
+ extend Resque::Plugins::Retry
677
+
678
+ @retry_exceptions = [Resque::TermException]
679
+ @ignore_exceptions = [Resque::TermException]
680
+ end
681
+ ```
682
+
683
+ Reminder: `@ignore_exceptions` should be a subset of `@retry_exceptions`.
684
+
560
685
  ### <a name="debug_log"></a> Debug Plugin Logging
561
686
 
562
687
  The inner-workings of the plugin are output to the Resque [Logger](https://github.com/resque/resque/wiki/Logging)
563
688
  when `Resque.logger.level` is set to `Logger::DEBUG`.
564
689
 
690
+ Add `VVERBOSE=true` as an environment variable to easily set the log level to debug.
691
+
692
+ ### Testing
693
+
694
+ To run a specific test and inspect logging output
695
+
696
+ ```
697
+ bundle exec rake TEST=the_test_file.rb VVERBOSE=true
698
+ ```
699
+
700
+ There are many example jobs implementing various use-cases for this gem in `test_jobs.rb`
701
+
565
702
  Contributing/Pull Requests
566
703
  --------------------------
567
704