Skip to content

Commit

Permalink
Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Rakovsky committed Jan 2, 2025
1 parent 8566c8c commit fda25ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions karton/system/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ def gc_collect_tasks(self) -> None:
task.headers.get("receiver", "unknown") for task in to_crash
]
for task in to_crash:
task.error = "This task was STARTED too long (TASK_STARTED_TIMEOUT), so status was changes to CRASHED."
task.error = (
"This task was STARTED too long (TASK_STARTED_TIMEOUT), "
"so status was changes to CRASHED."
)
self.backend.set_task_status(task, TaskState.CRASHED)
self.backend.increment_metrics_list(
KartonMetrics.TASK_CRASHED, to_increment
Expand Down Expand Up @@ -352,7 +355,7 @@ def args_parser(cls) -> argparse.ArgumentParser:
parser.add_argument(
"--crash-started-task-on-timeout",
action="store_const",
dest="crash_started_tasks_on_timeout",
dest="crash_started_tasks",
help="Crash Started tasks on timeout instead of deleting",
)
return parser
Expand All @@ -366,7 +369,7 @@ def config_from_args(cls, config: Config, args: argparse.Namespace):
"system": {
"enable_gc": args.enable_gc,
"enable_router": args.enable_router,
"crash_started_tasks_on_timeout": args.crash_started_tasks_on_timeout,
"crash_started_tasks_on_timeout": args.crash_started_tasks,
"gc_interval": args.gc_interval,
"task_dispatched_timeout": args.task_dispatched_timeout,
"task_started_timeout": args.task_started_timeout,
Expand Down

0 comments on commit fda25ba

Please sign in to comment.