Skip to content

Commit 5c6b268

Browse files
committed
Disable call setWinner
1 parent 6f71315 commit 5c6b268

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/indexer/indexer.service.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -652,25 +652,25 @@ export class IndexerService {
652652
.call() as bigint
653653
}
654654

655-
@Cron(CronExpression.EVERY_DAY_AT_MIDNIGHT, {
656-
timeZone: 'America/Los_Angeles'
657-
})
658-
async callSetWinner() {
659-
for(let i = 0; i < 3; i++) {
660-
try {
661-
const currentCompetitionId = await this.getCompetitionId()
662-
this.logger.log(`Current competition id=${currentCompetitionId}`)
663-
await this.startNewCompetition()
664-
await this.sleep(4000)
665-
const newCompetitionId = await this.getCompetitionId()
666-
this.logger.log(`Started new competition id=${newCompetitionId}`)
667-
const setWinnerHash = await this.setWinnerByCompetitionId(currentCompetitionId)
668-
this.logger.log(`New setWinner is called, txnHash=${setWinnerHash}`)
669-
break;
670-
} catch (e) {
671-
this.logger.warn(`Failed to send setWinner transaction, attempt: ${(i + 1)} / 3:`, e)
672-
await this.sleep(4000)
673-
}
674-
}
675-
}
655+
// @Cron(CronExpression.EVERY_DAY_AT_MIDNIGHT, {
656+
// timeZone: 'America/Los_Angeles'
657+
// })
658+
// async callSetWinner() {
659+
// for(let i = 0; i < 3; i++) {
660+
// try {
661+
// const currentCompetitionId = await this.getCompetitionId()
662+
// this.logger.log(`Current competition id=${currentCompetitionId}`)
663+
// await this.startNewCompetition()
664+
// await this.sleep(4000)
665+
// const newCompetitionId = await this.getCompetitionId()
666+
// this.logger.log(`Started new competition id=${newCompetitionId}`)
667+
// const setWinnerHash = await this.setWinnerByCompetitionId(currentCompetitionId)
668+
// this.logger.log(`New setWinner is called, txnHash=${setWinnerHash}`)
669+
// break;
670+
// } catch (e) {
671+
// this.logger.warn(`Failed to send setWinner transaction, attempt: ${(i + 1)} / 3:`, e)
672+
// await this.sleep(4000)
673+
// }
674+
// }
675+
// }
676676
}

0 commit comments

Comments
 (0)