feat(conversations): queue maintenance jobs

This commit is contained in:
2026-06-05 17:25:22 +08:00
parent 6851e20aa7
commit 9a1813485f
6 changed files with 472 additions and 23 deletions
+4
View File
@@ -106,6 +106,10 @@ func Bootstrap(env string) (*App, error) {
workerPool := worker.NewWorkerPool(db)
automation.RegisterActionDeliveryJobs(workerPool, &dbProvider{db: db})
service.RegisterConversationMaintenanceJobs(workerPool, db)
if _, err := service.EnqueueScheduledItemsTrigger(context.Background(), workerPool, time.Now()); err != nil {
applogger.L().Warnf("failed to enqueue initial scheduled item trigger: %v", err)
}
// Step 5: Connect to Redis (ref: Chatwoot config/cable.yml)
rdb, err := NewRedisClient(&cfg.Redis)