Skip to content

Commit dbdde17

Browse files
[autofix.ci] apply automated fixes
1 parent d6fc29e commit dbdde17

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

api/services/retention/workflow_run/clear_free_plan_expired_workflow_run_logs.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,13 @@ def run(self) -> None:
301301

302302
if self.dry_run:
303303
count_start = time.monotonic()
304-
batch_counts: dict[str, int] = dict(self.workflow_run_repo.count_runs_with_related(
305-
free_runs,
306-
count_node_executions=self._count_node_executions,
307-
count_trigger_logs=self._count_trigger_logs,
308-
))
304+
batch_counts: dict[str, int] = dict(
305+
self.workflow_run_repo.count_runs_with_related(
306+
free_runs,
307+
count_node_executions=self._count_node_executions,
308+
count_trigger_logs=self._count_trigger_logs,
309+
)
310+
)
309311
logger.info(
310312
"workflow_run_cleanup (batch #%s, dry_run): counted related records in %sms",
311313
batch_index,
@@ -340,11 +342,13 @@ def run(self) -> None:
340342

341343
try:
342344
delete_start = time.monotonic()
343-
counts: dict[str, int] = dict(self.workflow_run_repo.delete_runs_with_related(
344-
free_runs,
345-
delete_node_executions=self._delete_node_executions,
346-
delete_trigger_logs=self._delete_trigger_logs,
347-
))
345+
counts: dict[str, int] = dict(
346+
self.workflow_run_repo.delete_runs_with_related(
347+
free_runs,
348+
delete_node_executions=self._delete_node_executions,
349+
delete_trigger_logs=self._delete_trigger_logs,
350+
)
351+
)
348352
delete_ms = int((time.monotonic() - delete_start) * 1000)
349353
except Exception:
350354
logger.exception("Failed to delete workflow runs batch ending at %s", last_seen[0])

0 commit comments

Comments
 (0)