1
0
mirror of synced 2026-01-06 06:02:35 -05:00

exit deletion of workflow runs/logs if API rate limit exceeded (#42592)

This commit is contained in:
Peter Bengtsson
2023-09-14 11:15:49 -04:00
committed by GitHub
parent 1a519dccc0
commit b8c4772c47

View File

@@ -193,6 +193,10 @@ async function deleteWorkflowRuns(
assert(status === 204, `Unexpected status deleting logs for run ${run.id}: ${status}`)
} catch (error) {
console.warn('ERROR trying to delete the logs for run', run.id, error.message)
if (error.message && error.message.includes('API rate limit exceeded')) {
// This can not be recovered by continuing on to the next run.
break
}
}
}
@@ -209,6 +213,10 @@ async function deleteWorkflowRuns(
assert(status === 204, `Unexpected status deleting logs for run ${run.id}: ${status}`)
} catch (error) {
console.warn('ERROR trying to delete run', run.id, error.message)
if (error.message && error.message.includes('API rate limit exceeded')) {
// This can not be recovered by continuing on to the next run.
break
}
}
}