From 02b506ba0f5e3ceae192ae92be71323685fca136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Thu, 25 Jul 2024 17:03:55 +0200 Subject: [PATCH] Fix positional args --- event_listener.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/event_listener.py b/event_listener.py index 754c777a..544220fb 100644 --- a/event_listener.py +++ b/event_listener.py @@ -28,7 +28,7 @@ class Mode(Enum): def main(mode: Mode, dry_run: bool, max_retries: int): if mode == Mode.DEAD_LETTER: LOG.i("Using DeadLetterEventSource") - source = DeadLetterEventSource() + source = DeadLetterEventSource(max_retries) elif mode == Mode.LISTENER: LOG.i("Using PostgresEventSource") source = PostgresEventSource(DB_URI) @@ -57,6 +57,7 @@ def args(): "max_retries", help="Max retries to consider an event as error and not try to process it again", type=int, + nargs="?", default=_DEFAULT_MAX_RETRIES, ) parser.add_argument("--dry-run", help="Dry run mode", action="store_true")