Skip to content

Commit b0521b1

Browse files
add site id to slack messages
1 parent 2e44dbb commit b0521b1

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/tasks/disable-import-audit-processor/handler.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ export async function runDisableImportAuditProcessor(message, context) {
5454

5555
await site.save();
5656
await configuration.save();
57-
log.info('Disabled imports and audits');
58-
const slackMessage = `:broom: *Disabled imports*: ${importTypes.join(', ')} *and audits*: ${auditTypes.join(', ')}`;
57+
log.info(`For siteId: ${siteId}, Disabled imports and audits`);
58+
let slackMessage = `:broom: *For siteId: ${siteId}, Disabled imports*: ${importTypes.join(', ')} *and audits*: ${auditTypes.join(', ')}`;
59+
await say(env, log, slackContext, slackMessage);
60+
slackMessage = 'The list of enabled imports and audits may differ from the disabled ones because items that are already enabled are not automatically disabled.';
5961
await say(env, log, slackContext, slackMessage);
6062
} catch (error) {
6163
log.error('Error in disable import and audit processor:', error);

src/tasks/opportunity-status-processor/handler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ export async function runOpportunityStatusProcessor(message, context) {
9898

9999
// send status messages to slack
100100
if (statusMessages.length > 0) {
101+
const slackMessage = `:white_check_mark: *Opportunities status for site ${siteId}*:`;
101102
const combinedMessage = statusMessages.join('\n');
103+
await say(env, log, slackContext, slackMessage);
102104
await say(env, log, slackContext, combinedMessage);
103105
}
104106
} catch (error) {

0 commit comments

Comments
 (0)