Showing
2 changed files
with
5 additions
and
5 deletions
@@ -15,10 +15,10 @@ const londonTask = require('./tasks/london-task'); | @@ -15,10 +15,10 @@ const londonTask = require('./tasks/london-task'); | ||
15 | global.isProduction = process.env.NODE_ENV === 'production'; | 15 | global.isProduction = process.env.NODE_ENV === 'production'; |
16 | global.sender = new Sender(config.monitorReport); // 初始化数据上报 | 16 | global.sender = new Sender(config.monitorReport); // 初始化数据上报 |
17 | 17 | ||
18 | -// schedule.scheduleJob('0 */15 * * * *', () => { | ||
19 | -// logger.info('[process]task start spiderTask'); // 比价任务 | ||
20 | -// spiderTask(dayjs().unix()); | ||
21 | -// }); | 18 | +schedule.scheduleJob('0 */15 * * * *', () => { |
19 | + logger.info('[process]task start spiderTask'); // 比价任务 | ||
20 | + spiderTask(dayjs().unix()); | ||
21 | +}); | ||
22 | 22 | ||
23 | schedule.scheduleJob('0 15 10 * * *', () => { | 23 | schedule.scheduleJob('0 15 10 * * *', () => { |
24 | logger.info('[process]task start calvAvgTask'); // 根据比价记录表计算昨日平均价 | 24 | logger.info('[process]task start calvAvgTask'); // 根据比价记录表计算昨日平均价 |
@@ -13,7 +13,7 @@ module.exports = async(data) => { | @@ -13,7 +13,7 @@ module.exports = async(data) => { | ||
13 | }); | 13 | }); |
14 | 14 | ||
15 | if (!updateRows) { | 15 | if (!updateRows) { |
16 | - const insertRow = await mysqlPool.insert('INSERT `channel_sku_compare` (`product_id`, `sku`, `size_id`,`channel_price`, `low_rate`, `high_rate`, `channel_average_price`, `update_time`, `status`) SELECT `product_id`,`id`,`size_id`, :channelPrice, 0.05, 0, 0.00, :updateTime, 0 FROM `storage` WHERE `product_id` = :productId AND `size_id` = :sizeId', { | 16 | + const insertRow = await mysqlPool.insert('INSERT `channel_sku_compare` (`product_id`, `sku`, `size_id`,`channel_price`, `low_rate`, `high_rate`, `channel_average_price`, `update_time`, `status`) SELECT `product_id`,`id`,`size_id`, :channelPrice, 0.05, 0.05, 0.00, :updateTime, 0 FROM `storage` WHERE `product_id` = :productId AND `size_id` = :sizeId', { |
17 | channelPrice: price, | 17 | channelPrice: price, |
18 | updateTime: time, | 18 | updateTime: time, |
19 | productId, | 19 | productId, |
-
Please register or login to post a comment