|
@@ -32,11 +32,7 @@ async function getTransfers(ctx) {
|
|
obj.chain = 'bsc_mainnet'
|
|
obj.chain = 'bsc_mainnet'
|
|
var temp_obj = { ...obj }
|
|
var temp_obj = { ...obj }
|
|
var index = 0
|
|
var index = 0
|
|
- //提交归集任务
|
|
|
|
- if (temp_obj.address) {
|
|
|
|
- logger.log('pushCollectConisObj>>>', temp_obj.address)
|
|
|
|
- redis.redis_push(reids_token_config.COLLECT_CONIS_QUEUE_KEY, JSON.stringify(temp_obj))
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
// for (let index = 0; index < 30; index++) {
|
|
// for (let index = 0; index < 30; index++) {
|
|
await moralis.getTokenTransfers(obj).then((result) => {
|
|
await moralis.getTokenTransfers(obj).then((result) => {
|
|
logger.log('getTransfers response', 'index=' + index, result)
|
|
logger.log('getTransfers response', 'index=' + index, result)
|
|
@@ -62,7 +58,13 @@ async function getTransfers(ctx) {
|
|
redis.redis_set(reids_token_config.LAST_TOTAL_TOKEN_FREE, (parseInt(tr.gas_price) * parseInt(account_config.TOKEN_GAS_LIMIT)).toString());
|
|
redis.redis_set(reids_token_config.LAST_TOTAL_TOKEN_FREE, (parseInt(tr.gas_price) * parseInt(account_config.TOKEN_GAS_LIMIT)).toString());
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if (json_obj.data.total > 0) {
|
|
|
|
+ //提交归集任务
|
|
|
|
+ if (temp_obj.address) {
|
|
|
|
+ logger.log('pushCollectConisObj>>>', temp_obj.address)
|
|
|
|
+ redis.redis_push(reids_token_config.COLLECT_CONIS_QUEUE_KEY, JSON.stringify(temp_obj))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('pushCollectConisObj error=', error)
|
|
console.error('pushCollectConisObj error=', error)
|