wenlele 2 years ago
parent
commit
0321b69782
  1. 1
      api/app/lib/controllers/push/config.js
  2. 5
      api/app/lib/schedule/alarms_push.js
  3. 10
      api/app/lib/service/kafka.js

1
api/app/lib/controllers/push/config.js

@ -19,6 +19,7 @@ async function list (ctx) {
where: { where: {
del: false del: false
}, },
order: [['id', 'desc']],
include: [{ include: [{
model: models.ProjectCorrelation, model: models.ProjectCorrelation,
where: projectCorrelationWhere, where: projectCorrelationWhere,

5
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 curMinOfYear = moment().diff(moment().startOf('year'), 'minutes')
const configListRes = await models.AlarmPushConfig.findAll({ const configListRes = await models.AlarmPushConfig.findAll({
where: { where: {
del: false del: false,
disable: false
}, },
order: ['id'], order: ['id'],
include: [{ include: [{
model: models.ProjectCorrelation, model: models.ProjectCorrelation,
where: { where: {
del: false del: false,
}, },
required: true required: true
}], }],

10
api/app/lib/service/kafka.js

@ -12,12 +12,12 @@ module.exports = async function factory(app, opts) {
console.log('111111 ready 666666666666') console.log('111111 ready 666666666666')
}) })
// const kafka = { const kafka = {
// producer: producer, producer: producer,
// configUpdateMessage: opts.configUpdateMessage || {} configUpdateMessage: opts.configUpdateMessage || {}
// }; };
// app.fs.kafka = kafka; app.fs.kafka = kafka;
app.fs.logger.log('debug', "[FS-KAFKA]", "Init.Success"); app.fs.logger.log('debug', "[FS-KAFKA]", "Init.Success");

Loading…
Cancel
Save