Enhance notification delivery system with scheduled processing
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Introduced a new `NotificationWorker` to promote due scheduled notifications from pending to sent, improving notification management. - Added `NotificationInterval` configuration to schedule the notification delivery worker, with a default value for flexibility. - Implemented `MarkDueScheduledAsSent` method in the notification repository to update the status of notifications based on their delivery time. - Updated the notification service to process due scheduled notifications during relevant operations, ensuring timely delivery. This update enhances the notification system by automating the delivery of scheduled notifications, improving user engagement and operational efficiency.
This commit is contained in:
@@ -33,6 +33,8 @@ type WorkerConfig struct {
|
||||
// TranslationEnabled schedules the automatic batch translation cron job on the worker.
|
||||
// On-demand translation (admin/public tender endpoints and AI pipeline routes on web) is unaffected.
|
||||
TranslationEnabled bool `env:"WORKER_TRANSLATION_ENABLED" envDefault:"true"`
|
||||
// NotificationInterval schedules promotion of due scheduled notifications from pending to sent.
|
||||
NotificationInterval string `env:"WORKER_NOTIFICATION_INTERVAL" envDefault:"0 * * * * *"`
|
||||
}
|
||||
|
||||
// AISummarizerConfig holds configuration for the external AI summarizer service.
|
||||
|
||||
Reference in New Issue
Block a user