Skip to content

Commit

Permalink
chore: fix clean up action timeout to be executed between resources d…
Browse files Browse the repository at this point in the history
…eletion (#2228)
  • Loading branch information
aloisio-m-bastian authored Feb 26, 2025
1 parent c1738fa commit 29b6cb3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ const deleteResources = async (
`🗑️ Deleted resource: ${singleResourceUrl} - Status code: ${deleteResponse.status}`
)
deletedCount++
console.log(`⏳ Waiting for ${wait_time} seconds before continuing...`)
await setTimeout(wait_time * 1000)
} catch (error) {
console.error(`❌ Error deleting resource with ID ${resource.id}: ${error.message}`)
}
Expand All @@ -126,9 +128,6 @@ const deleteResources = async (
console.log('✅ No resources deleted in this iteration.')
break
}

console.log(`⏳ Waiting for ${wait_time} seconds before continuing...`)
await setTimeout(wait_time * 1000)
}
}

Expand Down

0 comments on commit 29b6cb3

Please sign in to comment.