Skip to content

Commit

Permalink
Change backoff-time to 10s
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxachun committed Oct 13, 2023
1 parent 58cc967 commit 010e766
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/grumpy-peaches-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/dev-process-manager": minor
---

Change maximum backoff time from 30s to 10s
2 changes: 1 addition & 1 deletion src/daemon-command/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class Script {
this.handleLogs(`[dev-pm] process crashed, restarting...`);
this.restartCount++;
this.status = "backoff";
const waitTime = Math.min(Math.pow(1.3, this.restartCount), 30);
const waitTime = Math.min(Math.pow(1.3, this.restartCount), 10);
this.handleLogs(`[dev-pm] waiting ${Math.round(waitTime)}s between restarts`);
await new Promise((r) => setTimeout(r, waitTime * 1000));
if (this.status == "backoff") {
Expand Down

0 comments on commit 010e766

Please sign in to comment.