You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,8 @@ default `'text'`)
146
146
`MonoLogger::FATAL`, default `false`)
147
147
*`VERBOSE` - Maximize log verbosity if non-empty (equivalent to a level
148
148
of `MonoLogger::DEBUG`, default `false`)
149
-
149
+
*`ENABLE_DELAYED_REQUEUE_BATCH` - Enable batched delayed job enqueueing per second (default `false`) - [See section below on consequences](#batched-delayed-job-and-resque-enqueue-hooks)
150
+
*`DELAYED_REQUEUE_BATCH_SIZE` - Set the delayed job batch size if `ENABLE_DELAYED_REQUEUE_BATCH` is enabled (default `100`). If `<= 1`, this disables batching.
150
151
151
152
### Resque Pool integration
152
153
@@ -755,6 +756,21 @@ This table explains the version requirements for rufus-scheduler
755
756
| `~> 4.0` | `~> 3.0` |
756
757
| `< 4.0` | `~> 2.0` |
757
758
759
+
##### Batched delayed job and resque enqueue hooks
760
+
761
+
Batching delayed job enqueueing can speed up when per-second job counts grows,
762
+
avoiding situations that may cause delayed enqueues to fall behind. This batching wraps enqueues in a `multi` pipeline, making far fewer roundtrips to the server.
763
+
764
+
However, in `redis` gem `>= 4.0`, any operations to redis within the `multi`
765
+
block must use the multi handle so that the actions are captured. Resque's hooks
766
+
do not currently have a way to pass this around, and so compatibility with other
767
+
resque plugins or hooks which access redis at enqueue time is impacted with
768
+
batch mode.
769
+
770
+
Detecting when this occurs can be tricky, you must watch for logs
771
+
emitted by your `resque-scheduler` process such as `Redis::CommandError: ERR
772
+
MULTI calls can not be nested` or `NoMethodError: undefined method nil? for
773
+
<Redis::Future`, and delayed jobs you expect would not be enqueued.
0 commit comments