We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f95a24 commit 6769013Copy full SHA for 6769013
src/helpers/votesVpValue.ts
@@ -56,15 +56,14 @@ async function refreshVotesVpValues(data: Datum[]) {
56
57
export default async function run() {
58
while (true) {
59
- while (true) {
60
- const votes = await getVotes();
61
-
62
- if (votes.length === 0) break;
+ const votes = await getVotes();
63
+ if (votes.length) {
64
await refreshVotesVpValues(votes);
+ }
65
66
- if (votes.length < BATCH_SIZE) break;
+ if (votes.length < BATCH_SIZE) {
+ await snapshot.utils.sleep(REFRESH_INTERVAL);
67
}
68
- await snapshot.utils.sleep(REFRESH_INTERVAL);
69
70
0 commit comments