Skip to content

Commit

Permalink
fix(sms): send sms in good time
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed May 7, 2024
1 parent 8532450 commit fc5055c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/config/domifaConfig.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export function loadConfig(x: Partial<DomifaEnv>): DomifaConfig {
x,
"DOMIFA_CRON_SMS_CONSUMER_CRONTIME",
{
defaultValue: "0 19 * * 1-5",
defaultValue: "20 19 * * 1-5",
}
),
fetchEndDomCronTime: configParser.parseString(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ export class CronSmsInteractionSenderService {
and (s.sms->>'enabledByDomifa')::boolean is true
and (s.sms->>'enabledByStructure')::boolean is true
AND s."timeZone"=$1
AND (jsonb_object_field_text(s.sms, $2)::boolean IS TRUE)`,
[timeZone, day]
AND (s.sms->'schedule'->>'${day}')::boolean = true`[timeZone]
);

if (!messagesToSend || messagesToSend.length === 0) {
Expand Down

0 comments on commit fc5055c

Please sign in to comment.