Skip to content

Commit

Permalink
wait 5 seconds at all times
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterbrandsen authored Feb 6, 2024
1 parent b76d1dc commit faa0832
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/requests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ export default class Requests {
static async executeCycle() {
let cycle = await getCycle();
const cycleLength = cycle.length;
if (cycleLength === 0) {
await sleep(1000 * 10);
}
else {
if (cycleLength > 0) {
const start = Date.now();
logger.info(`Executing cycle ${cycleLength}`)

Expand Down Expand Up @@ -71,6 +68,8 @@ export default class Requests {
const timePerRoom = (Date.now() - start) / cycleLength
UploadStatus({ cycleDetails: { amount: cycleLength, success: status.processed.length, failed: status.failed.length, successRate: Math.round((status.processed.length / cycleLength) * 100) }, timePerRoom, percentageOnTarget, timeTaken })
}
await sleep(1000 * 5);

this.executeCycle();
}
}

0 comments on commit faa0832

Please sign in to comment.