|
@@ -24,14 +24,14 @@ export async function faucetAccount(address: string) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-async function startFaucet(concurrency = 10) {
|
|
|
+async function startFaucet(concurrency , index) {
|
|
|
const accountsRaw = await DBClient.instance.account.findMany({
|
|
|
where: {
|
|
|
status: Status.Inited,
|
|
|
},
|
|
|
})
|
|
|
const accounts = accountsRaw
|
|
|
- // .filter(account => account.id)
|
|
|
+ .filter(account => account.id % 10 === index)
|
|
|
await forEachAsync(accounts, concurrency, async (account, index) => {
|
|
|
console.log(`${index}/${accounts.length}: processing ${account.address}`)
|
|
|
try {
|
|
@@ -51,4 +51,4 @@ async function startFaucet(concurrency = 10) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-await startFaucet(8)
|
|
|
+await startFaucet(8, 0)
|