Skip to content

Commit

Permalink
Fix serviceName not set
Browse files Browse the repository at this point in the history
Issue: BB-561
  • Loading branch information
KillianG committed Nov 13, 2024
1 parent 277809c commit 933bd26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/notification/queueProcessor/QueueProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const NotificationDestination = require('../destination');
const configUtil = require('../utils/config');
const messageUtil = require('../utils/message');
const NotificationConfigManager = require('../NotificationConfigManager');
const libConstants = require('../../../lib/constants');

const processedEvents = ZenkoMetrics.createCounter({
name: 's3_notification_queue_processor_events_total',
Expand Down Expand Up @@ -92,6 +93,7 @@ class QueueProcessor extends EventEmitter {
this.kafkaConfig = kafkaConfig;
this.notifConfig = notifConfig;
this.destinationId = destinationId;
this.serviceName = libConstants.services.notificationQueueProcessor;
this.destinationConfig
= notifConfig.destinations.find(dest => dest.resource === destinationId);
assert(this.destinationConfig, `Invalid destination argument "${destinationId}".` +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const FailedCRRProducer = require('../failedCRR/FailedCRRProducer');
const ReplayProducer = require('../replay/ReplayProducer');
const MetricsProducer = require('../../../lib/MetricsProducer');
const { http: HttpAgent, https: HttpsAgent } = require('httpagent');
const libConstants = require('../../../lib/constants');

// StatsClient constant default for site metrics
const INTERVAL = 300; // 5 minutes;
Expand Down Expand Up @@ -225,6 +226,7 @@ class ReplicationStatusProcessor {
this._consumer = null;
this._gcProducer = null;
this._mProducer = null;
this.serviceName = libConstants.services.replicationStatusProcessor;

this.logger =
new Logger('Backbeat:Replication:ReplicationStatusProcessor');
Expand Down
1 change: 1 addition & 0 deletions lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const constants = {
replicationQueueProcessor: 'ReplicationQueueProcessor',
replicationReplayProcessor: 'ReplicationReplayProcessor',
replicationStatusProcessor: 'ReplicationStatusProcessor',
notificationQueueProcessor: 'NotificationQueueProcessor',
},
locationStatusCollection: '__locationStatusStore',
lifecycleListing: {
Expand Down

0 comments on commit 933bd26

Please sign in to comment.