exit deletion of workflow runs/logs if API rate limit exceeded (#42592)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user