Skip to content

Commit

Permalink
♻️ Refactor: Running weight-aggregation every 1 hour
Browse files Browse the repository at this point in the history
  • Loading branch information
PsicoThePato committed Oct 21, 2024
1 parent 24bd9c5 commit bd2e181
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/commune-worker/src/workers/weight-aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export async function weightAggregatorWorker(api: ApiPromise) {
"subnet",
);
}
await sleep(BLOCK_TIME * 2);
// We aim to run this task every 1 hour (8 seconds block * 450)
await sleep(BLOCK_TIME * 450);
} catch (e) {
log("UNEXPECTED ERROR: ", e);
await sleep(BLOCK_TIME);
Expand Down

0 comments on commit bd2e181

Please sign in to comment.