|
@@ -8,7 +8,7 @@ async function startCheck(concurrency) {
|
|
|
where: {
|
|
|
finish: 1,
|
|
|
},
|
|
|
- take: 100,
|
|
|
+ take: 1000,
|
|
|
})
|
|
|
await forEachAsync(accountsRaw, concurrency, async (account, index) => {
|
|
|
console.log(`${index}/${accountsRaw.length}: processing ${account.address}`)
|
|
@@ -17,12 +17,13 @@ async function startCheck(concurrency) {
|
|
|
// await faucetAccount(account.address)
|
|
|
const client = new InitiaClient(account.mnemonic, true)
|
|
|
const done = await client.mintPart()
|
|
|
- if (done !== `undone`) {
|
|
|
+ console.log(done)
|
|
|
+ if (done != `undone`) {
|
|
|
await DBClient.instance.randomTask.update({
|
|
|
where: { id: account.id },
|
|
|
data: { finish: 2 },
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else if (done == `undone`) {
|
|
|
await DBClient.instance.randomTask.update({
|
|
|
where: { id: account.id },
|
|
|
data: { finish: -2 },
|
|
@@ -30,7 +31,7 @@ async function startCheck(concurrency) {
|
|
|
}
|
|
|
// const unApprovedList = await client.mintJennie()
|
|
|
} catch (e) {
|
|
|
- console.log(e)
|
|
|
+ console.log(e.message)
|
|
|
// await DBClient.instance.account.update({
|
|
|
// where: { id: account.id },
|
|
|
// data: { status: Status.MayQueued, message: e.message },
|
|
@@ -39,4 +40,4 @@ async function startCheck(concurrency) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-startCheck(10)
|
|
|
+startCheck(20)
|