Commit 6682d469 authored by 李尚科's avatar 李尚科

fix

parent 942c0586
Pipeline #12310 passed with stage
in 4 seconds
......@@ -27,8 +27,8 @@ class HuaYunPaas extends Subscription {
let redRes = await app.redis.setnx(lock, 1);
ctx.logger.info(JSON.stringify(redRes));
ctx.logger.info('in cron');
await app.redis.expire(lock, 2);
if (Number(redRes) === 1) {
await app.redis.expire(lock, 2);
ctx.logger.info('in redis');
await this.logic();
}
......
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