Skip to content

Commit b1b1511

Browse files
address review comments
1 parent 221e53e commit b1b1511

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,18 @@ export async function runDisableImportAuditProcessor(message, context) {
7272
if (auditsDisabled.length > 0) {
7373
await configuration.save();
7474
}
75-
log.info(`For site: ${siteUrl}: Disabled imports and audits`);
75+
if (auditsDisabled.length > 0) {
76+
log.info(`For site: ${siteUrl}: Disabled imports and audits`);
77+
} else {
78+
log.info(`For site: ${siteUrl}: Disabled imports; audits unchanged`);
79+
}
7680

7781
const importsText = importTypes.length > 0 ? importTypes.join(', ') : 'None';
7882
const auditsText = auditsDisabled.length > 0 ? auditsDisabled.join(', ') : 'None';
7983

8084
let slackMessage = `:broom: *For site: ${siteUrl}: Disabled imports*: ${importsText} *and audits*: ${auditsText}`;
8185
await say(env, log, slackContext, slackMessage);
82-
slackMessage = ':information_source: Only audits currently enabled for the site are disabled. Scheduled sites skip disable entirely.';
86+
slackMessage = ':information_source: Only audits currently enabled for the site are disabled. When scheduledRun=true, disable is skipped entirely.';
8387
await say(env, log, slackContext, slackMessage);
8488
} catch (error) {
8589
log.error('Error in disable import and audit processor:', error);

test/tasks/disable-import-audit-processor/disable-import-audit-processor.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ describe('Disable Import Audit Processor', () => {
154154
context.env,
155155
context.log,
156156
'test-slack-context',
157-
':information_source: Only audits currently enabled for the site are disabled. Scheduled sites skip disable entirely.',
157+
':information_source: Only audits currently enabled for the site are disabled. When scheduledRun=true, disable is skipped entirely.',
158158
);
159159

160160
// Verify successful completion

0 commit comments

Comments
 (0)