Skip to content

Commit

Permalink
chore: ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-doist committed Jul 30, 2024
1 parent 0f56ca0 commit 1774834
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sqs_workers/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def process_batch(self, wait_seconds: int = 0) -> BatchProcessingResult:
the number of successfully processed messages, and exit
"""
if self.batching_policy.batching_enabled:
messages = self.get_raw_messages(wait_seconds, self.batching_policy.batch_size)
messages = self.get_raw_messages(
wait_seconds, self.batching_policy.batch_size
)
success = self.process_messages(messages)
messages_with_success = ((m, success) for m in messages)
else:
Expand Down Expand Up @@ -140,7 +142,9 @@ def _handle_processed(self, messages_with_success: Iterable[Tuple[Any, bool]]):
{
"Id": m.message_id,
"ReceiptHandle": m.receipt_handle,
"VisibilityTimeout": self.backoff_policy.get_visibility_timeout(m),
"VisibilityTimeout": self.backoff_policy.get_visibility_timeout(
m
),
}
)

Expand Down

0 comments on commit 1774834

Please sign in to comment.