Skip to content

Commit

Permalink
Exit process when idle for too long
Browse files Browse the repository at this point in the history
  • Loading branch information
pastelsky committed Jan 3, 2024
1 parent 95b7bc6 commit 2fc6308
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/workers/docs-builder-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ setInterval(() => {
Date.now() - workerActiveTime,
"s",
);

throw new Error("Worker exited because it was jobless for too long.");
}
}, 5000);

Expand Down

0 comments on commit 2fc6308

Please sign in to comment.