Skip to content

Commit

Permalink
Add a short delay before deleting old versions.
Browse files Browse the repository at this point in the history
Hopefully this will work around the bogus resource in use error that
GAE started throwing recently.
  • Loading branch information
pkaminski committed Feb 28, 2025
1 parent 7aff85a commit 9afb3f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73634,6 +73634,8 @@ function run() {
// Run gcloud versions list cmd
yield exec.exec(toolCommand, appVersionCmd, options);
if (versions.length > limit) {
// Wait a couple seconds to try to avoid GAE's bogus resource conflict errors.
yield new Promise(r => setTimeout(r, 2000));
const versionsToDelete = versions.slice(0, versions.length - limit);
const appDeleteCmd = [
'app',
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ async function run(): Promise<void> {
await exec.exec(toolCommand, appVersionCmd, options);

if (versions.length > limit) {
// Wait a couple seconds to try to avoid GAE's bogus resource conflict errors.
await new Promise(r => setTimeout(r, 2000));

const versionsToDelete = versions.slice(0, versions.length - limit);

const appDeleteCmd = [
Expand Down

0 comments on commit 9afb3f3

Please sign in to comment.