Skip to content

Commit

Permalink
Change the node-info-updater-task updateInterval to 30 minutes:
Browse files Browse the repository at this point in the history
After we change to use batch mode, the time cost to retrieve all work reports from chain
has been reduced from ~100 minutes to ~5 minutes, so we can shorten the updateInterval
update group info every 30 minutes
  • Loading branch information
wuhaixian1984 committed Jun 21, 2024
1 parent 145d34a commit cf71f4e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/tasks/node-info-updater-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ export async function createNodeInfoUpdateTask(
context: AppContext,
loggerParent: Logger,
): Promise<SimpleTask> {
// update node count every 5 hours
// note: it's slow
const updateInterval = Dayjs.duration({
hours: 1,
}).asMilliseconds();
// After we change to use batch mode, the time cost to retrieve all work reports from chain
// has been reduced from ~100 minutes to ~5 minutes, so we can shorten the updateInterval
// update group info every 30 minutes
const updateInterval = 30 * 60 * 1000;

return makeIntervalTask(
5 * 1000,
Expand Down

0 comments on commit cf71f4e

Please sign in to comment.