Skip to content

Commit

Permalink
test: fix canned-response/business hours flaky test (#32642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Jun 20, 2024
1 parent efba929 commit 1428778
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions apps/meteor/app/livechat/server/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,22 @@ Meteor.startup(async () => {
});
await createDefaultBusinessHourIfNotExists();

settings.watch<boolean>('Livechat_enable_business_hours', async (value) => {
logger.debug(`Starting business hour manager ${value}`);
if (value) {
await businessHourManager.startManager();
return;
}
await businessHourManager.stopManager();
});
settings.watch<boolean>(
'Livechat_enable_business_hours',
async (value) => {
logger.debug(`Starting business hour manager ${value}`);
if (value) {
await businessHourManager.startManager();
return;
}
await businessHourManager.stopManager();
},
process.env.TEST_MODE === 'true'
? {
debounce: 10,
}
: undefined,
);

settings.watch<string>('Livechat_Routing_Method', () => {
void RoutingManager.startQueue();
Expand Down

0 comments on commit 1428778

Please sign in to comment.