From 4d47202ff9b0487747df0a358da27da1ccd9c789 Mon Sep 17 00:00:00 2001 From: Pastukhov Nikita Date: Mon, 15 Jan 2024 19:33:26 +0300 Subject: [PATCH] fix #141: correct SQS messages processing (#142) --- propan/__about__.py | 2 +- propan/brokers/sqs/sqs_broker.py | 1 + pyproject.toml | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/propan/__about__.py b/propan/__about__.py index 713fabca..9732567f 100644 --- a/propan/__about__.py +++ b/propan/__about__.py @@ -2,7 +2,7 @@ from unittest.mock import Mock -__version__ = "0.1.5.25" +__version__ = "0.1.5.26" INSTALL_MESSAGE = ( diff --git a/propan/brokers/sqs/sqs_broker.py b/propan/brokers/sqs/sqs_broker.py index b1ecaf35..43d9a86d 100644 --- a/propan/brokers/sqs/sqs_broker.py +++ b/propan/brokers/sqs/sqs_broker.py @@ -364,6 +364,7 @@ async def _consume(self, queue_url: str, handler: Handler) -> NoReturn: connected = True messages = r.get("Messages", []) + has_trash_messages = False for msg in messages: try: await handler.callback(msg, True) diff --git a/pyproject.toml b/pyproject.toml index 76a62b27..36f0aab2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ classifiers = [ dynamic = ["version"] dependencies = [ - "fast-depends>=2.1.1", + "fast-depends>=2.1.1,<2.2.0", "watchfiles", "typer", "uvloop>=0.14.0,!=0.15.0,!=0.15.1; sys_platform != 'win32' and (sys_platform != 'cygwin' and platform_python_implementation != 'PyPy')", @@ -250,4 +250,4 @@ omit = [ '*/__main__.py', '*/__init__.py', '*/annotations.py', -] \ No newline at end of file +]