From f1715dca7b156a03092751981dda96d28a0fc461 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Mon, 1 Apr 2024 14:06:20 +0200 Subject: [PATCH] Automatically re-run tasks in case of network issues (#140) * Automatically re-run tasks in case of network issues * new line --- .cirrus.star | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .cirrus.star diff --git a/.cirrus.star b/.cirrus.star new file mode 100644 index 0000000..6d77bf0 --- /dev/null +++ b/.cirrus.star @@ -0,0 +1,7 @@ +load("github.com/cirrus-modules/graphql", "rerun_task_if_issue_in_logs") + +def on_task_failed(ctx): + if ctx.payload.data.task.automaticReRun: + print("Task is already an automatic re-run! Won't even try to re-run it...") + return + rerun_task_if_issue_in_logs(ctx.payload.data.task.id, "The network connection was lost")