Remove Gorush, use direct APNs/FCM, fix worker queries
- Remove Gorush push server dependency (now using direct APNs/FCM) - Update docker-compose.yml to remove gorush service - Update config.go to remove GORUSH_URL - Fix worker queries: - Use auth_user instead of user_user table - Use completed_at instead of completion_date column - Add NotificationService to worker handler for actionable notifications - Add docs/PUSH_NOTIFICATIONS.md with architecture documentation - Update README.md, DOKKU_SETUP.md, and dev.sh 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/treytartt/casera-api/internal/config"
|
||||
"github.com/treytartt/casera-api/internal/database"
|
||||
"github.com/treytartt/casera-api/internal/push"
|
||||
"github.com/treytartt/casera-api/internal/repositories"
|
||||
"github.com/treytartt/casera-api/internal/services"
|
||||
"github.com/treytartt/casera-api/internal/worker/jobs"
|
||||
"github.com/treytartt/casera-api/pkg/utils"
|
||||
@@ -58,6 +59,11 @@ func main() {
|
||||
log.Info().Str("host", cfg.Email.Host).Msg("Email service initialized")
|
||||
}
|
||||
|
||||
// Initialize notification service for actionable push notifications
|
||||
notificationRepo := repositories.NewNotificationRepository(db)
|
||||
notificationService := services.NewNotificationService(notificationRepo, pushClient)
|
||||
log.Info().Msg("Notification service initialized")
|
||||
|
||||
// Parse Redis URL for Asynq
|
||||
redisOpt, err := asynq.ParseRedisURI(cfg.Redis.URL)
|
||||
if err != nil {
|
||||
@@ -85,7 +91,7 @@ func main() {
|
||||
)
|
||||
|
||||
// Create job handler
|
||||
jobHandler := jobs.NewHandler(db, pushClient, emailService, cfg)
|
||||
jobHandler := jobs.NewHandler(db, pushClient, emailService, notificationService, cfg)
|
||||
|
||||
// Create Asynq mux and register handlers
|
||||
mux := asynq.NewServeMux()
|
||||
|
||||
Reference in New Issue
Block a user