Skip to content

Commit 662be1e

Browse files
authored
fix: Default the consumer timeout to the maximum WaitTimeSeconds value (#39)
1 parent dc852ef commit 662be1e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/dramatiq_sqs/broker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ def consumer_class(self):
107107
return SQSConsumer
108108

109109
def consume(
110-
self, queue_name: str, prefetch: int = 1, timeout: int = 30000
110+
self,
111+
queue_name: str,
112+
prefetch: int = 1,
113+
timeout: int = MAX_WAIT_TIME_SECONDS * 1000,
111114
) -> dramatiq.Consumer:
112115
try:
113116
return self.consumer_class(

0 commit comments

Comments
 (0)