Shawn Lu 1 жил өмнө
parent
commit
6151dc57db
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      src/faucet/faucet.ts

+ 3 - 3
src/faucet/faucet.ts

@@ -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)