From d70b71c619979a92f859aa559f28e1ae2f7fb667 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 3 Nov 2022 12:35:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?AlarmPushConfig=20=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/push/config.js | 1 + api/app/lib/schedule/alarms_push.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/app/lib/controllers/push/config.js b/api/app/lib/controllers/push/config.js index 3feedea..21c630a 100644 --- a/api/app/lib/controllers/push/config.js +++ b/api/app/lib/controllers/push/config.js @@ -19,6 +19,7 @@ async function list (ctx) { where: { del: false }, + order: [['id', 'desc']], include: [{ model: models.ProjectCorrelation, where: projectCorrelationWhere, diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index 9b2c556..c7ff0ee 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -16,13 +16,14 @@ module.exports = function (app, opts) { const curMinOfYear = moment().diff(moment().startOf('year'), 'minutes') const configListRes = await models.AlarmPushConfig.findAll({ where: { - del: false + del: false, + disable: false }, order: ['id'], include: [{ model: models.ProjectCorrelation, where: { - del: false + del: false, }, required: true }], From 64ee2af415f0c035c90f978709e92e344071c5f9 Mon Sep 17 00:00:00 2001 From: wuqun Date: Thu, 3 Nov 2022 13:34:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(*)=E5=9B=9E=E9=80=80=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/service/kafka.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/app/lib/service/kafka.js b/api/app/lib/service/kafka.js index 5c4cb9a..46adfbc 100644 --- a/api/app/lib/service/kafka.js +++ b/api/app/lib/service/kafka.js @@ -12,12 +12,12 @@ module.exports = async function factory(app, opts) { console.log('111111 ready 666666666666') }) - // const kafka = { - // producer: producer, - // configUpdateMessage: opts.configUpdateMessage || {} - // }; + const kafka = { + producer: producer, + configUpdateMessage: opts.configUpdateMessage || {} + }; - // app.fs.kafka = kafka; + app.fs.kafka = kafka; app.fs.logger.log('debug', "[FS-KAFKA]", "Init.Success");