Skip to content

Commit

Permalink
update state also on fetcher failure
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaz committed Dec 26, 2023
1 parent 5bd3ab8 commit 400e98b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fetcher.ts
Original file line number Diff line number Diff line change
@@ -676,6 +676,10 @@ export class Fetcher {
error(`unexpected error: ${(err as Error).stack}`);
await sendNotification(`unexpected error: ${(err as Error).stack}`);
log(`[Error] ------------------------------------------------------------`);

this.writeEndedProposalToDb();
this.setState();

console.log('sleep for 1 min');
TonVoteSdk.sleep(1 * 60 * 1000);
// this.client = await TonVoteSdk.getClientV2();

0 comments on commit 400e98b

Please sign in to comment.