refactor: update script

* runs promises serially instead of running them all at once
* directly calls /new-episode route for latest episode
This commit is contained in:
2024-10-06 08:48:10 -04:00
parent 45edd284ee
commit d13bc2a64e
2 changed files with 40 additions and 38 deletions

5
src/libs/promiseQueue.ts Normal file
View File

@@ -0,0 +1,5 @@
export async function promiseQueue(queue: (() => Promise<void>)[]) {
for (const promise of queue) {
await promise();
}
}