Commit c1019e1d authored by 姜登's avatar 姜登

addlimit

parent 6ab20090
Pipeline #18407 passed with stage
in 7 seconds
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: jd * @Author: jd
* @Date: 2019-02-25 18:59:53 * @Date: 2019-02-25 18:59:53
* @LastEditors: jd * @LastEditors : jd
* @LastEditTime: 2019-11-27 17:07:39 * @LastEditTime : 2019-12-21 14:12:18
*/ */
'use strict'; 'use strict';
...@@ -34,10 +34,13 @@ class CacheService extends Service { ...@@ -34,10 +34,13 @@ class CacheService extends Service {
} }
const order = await ctx.model.TaskStatus.findOne({ const order = await ctx.model.TaskStatus.findOne({
attributes: ['id', 'status'], attributes: ['id', 'appKey', 'status'],
where: { taskId: key }, where: { taskId: key },
}); });
if (order && order.status !== 'success') { if (order && order.status !== 'success') {
if (order.appKey === '9FBBA75BBFC24401AA6A76AEFC277346' && value.status === 'login') {
ctx.logger.info(`ipLimit ADD ${ctx.request.ip} value:`);
}
await order.update({ ...value }); await order.update({ ...value });
} else { } else {
ctx.logger.error('【Cache】set no order or already success', key); ctx.logger.error('【Cache】set no order or already success', key);
......
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