Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Prevent instant infinite loop on error
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed May 15, 2019
1 parent 4e00a24 commit dbacefd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/jobs/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export async function cron(): Promise<never> {
}

db.release();
await new Promise(r => setTimeout(r, 60 * 1000));
} catch (err) {
console.error('cron', err);
}

await new Promise(r => setTimeout(r, 60 * 1000));
}
}

0 comments on commit dbacefd

Please sign in to comment.