Commit c50fb342 by 王悦

fix 频繁

parent 0a1d3c07
......@@ -688,6 +688,7 @@ class TrademarktransactionService extends ServiceBase {
await this.updateAlistatus(downids,"FAIL_END")
this.updateAlistatus(ids,status)
}
async updateAlistatus(ids, status) {
let res = await this.dao.model.findAll({where: {id: {$in: ids}}})
for (const item of res) {
......@@ -697,6 +698,7 @@ class TrademarktransactionService extends ServiceBase {
action:item.publish_status==="audit"?"UploadTrademarkOnSale":"UpdateTrademarkOnsale",
reqbody: obj
})
await this.sleep()
if (err){
item.fail_reason = err
item.publish_status = "fail"
......
......@@ -209,5 +209,12 @@ class ServiceBase {
}
return uuid.join('');
}
sleep() {
return new Promise(resolve => {
setTimeout(() => {
resolve()
}, 100)
})
}
}
module.exports = ServiceBase;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment