Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
kaapstorm committed Jan 11, 2025
1 parent 2915095 commit c26109d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions corehq/motech/repeaters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ def process_repeaters():
independently the way that ``check_repeaters()`` does.
"""

# NOTE: If `process_repeaters()` needs to be restarted and
# `process_repeaters_lock` was not released, expire the lock
# to allow `process_repeaters()` to start:
# NOTE: If `process_repeaters()` was killed and `process_repeaters_lock`
# was not released, expire the lock to allow `process_repeaters()`
# to start:
#
# $ ./manage.py expire_process_repeaters_lock
#
Expand Down Expand Up @@ -488,13 +488,13 @@ def _get_wait_duration_seconds(repeat_record):
def update_repeater(repeat_record_states, repeater):
"""
Determines whether the repeater should back off, based on the
results of ``_process_repeat_record()`` tasks.
results of ``process_ready_repeat_record()``.
"""
if all(s in (State.Empty, None) for s in repeat_record_states):
if all(state in (State.Empty, None) for state in repeat_record_states):
# We can't tell anything about the remote endpoint.
return
success_or_invalid = (State.Success, State.InvalidPayload)
if any(s in success_or_invalid for s in repeat_record_states):
if any(state in success_or_invalid for state in repeat_record_states):
# The remote endpoint appears to be healthy.
repeater.reset_backoff()
else:
Expand Down

0 comments on commit c26109d

Please sign in to comment.