mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 21:27:10 +01:00
Fix positional args
This commit is contained in:
parent
32488284ec
commit
02b506ba0f
@ -28,7 +28,7 @@ class Mode(Enum):
|
|||||||
def main(mode: Mode, dry_run: bool, max_retries: int):
|
def main(mode: Mode, dry_run: bool, max_retries: int):
|
||||||
if mode == Mode.DEAD_LETTER:
|
if mode == Mode.DEAD_LETTER:
|
||||||
LOG.i("Using DeadLetterEventSource")
|
LOG.i("Using DeadLetterEventSource")
|
||||||
source = DeadLetterEventSource()
|
source = DeadLetterEventSource(max_retries)
|
||||||
elif mode == Mode.LISTENER:
|
elif mode == Mode.LISTENER:
|
||||||
LOG.i("Using PostgresEventSource")
|
LOG.i("Using PostgresEventSource")
|
||||||
source = PostgresEventSource(DB_URI)
|
source = PostgresEventSource(DB_URI)
|
||||||
@ -57,6 +57,7 @@ def args():
|
|||||||
"max_retries",
|
"max_retries",
|
||||||
help="Max retries to consider an event as error and not try to process it again",
|
help="Max retries to consider an event as error and not try to process it again",
|
||||||
type=int,
|
type=int,
|
||||||
|
nargs="?",
|
||||||
default=_DEFAULT_MAX_RETRIES,
|
default=_DEFAULT_MAX_RETRIES,
|
||||||
)
|
)
|
||||||
parser.add_argument("--dry-run", help="Dry run mode", action="store_true")
|
parser.add_argument("--dry-run", help="Dry run mode", action="store_true")
|
||||||
|
Loading…
Reference in New Issue
Block a user