Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 7e031ef

Browse files
authored
disable jitter in polling example.
AFAIK the default jitter algorithm is the `full_jitter` making the polling interval vary between 0 and 1 sec in the given example. If someone wants to have a fixed polling interval/frequency as the lead of this example suggests then jitter should be disabled.
1 parent c2f4e18 commit 7e031ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,12 @@ gets a non-falsey result could be defined like like this:
166166

167167
.. code-block:: python
168168
169-
@backoff.on_predicate(backoff.constant, interval=1)
169+
@backoff.on_predicate(backoff.constant, jitter=None, interval=1)
170170
def poll_for_message(queue):
171171
return queue.get()
172172
173+
The jitter is disabled in order to keep the polling frequency fixed.
174+
173175
Jitter
174176
------
175177

0 commit comments

Comments
 (0)