tools: add send-test-push for one-shot Asynq push verification
Backend CI / Test (push) Has been cancelled
Backend CI / Contract Tests (push) Has been cancelled
Backend CI / Build (push) Has been cancelled
Backend CI / Lint (push) Has been cancelled
Backend CI / Secret Scanning (push) Has been cancelled

Tiny CLI that enqueues a notification:send_push task into Redis. The
worker picks it up and routes through internal/push/Client.SendToAll —
which is exactly the path used by HandleSmartReminder, HandleDailyDigest,
and any other in-process push, so a successful round-trip here proves the
production push pipeline end-to-end without waiting for the next cron tick.

Requires Redis to be reachable. Easiest path:

  kubectl -n honeydue port-forward svc/redis 6379:6379

  go run ./cmd/send-test-push --user-id 6 --title "..." --message "..."

The worker logs `Sending push notification...` followed by the APNs
batch result; failure modes (BadDeviceToken, circuit breaker, etc.)
surface as the same error_message rows the existing notif-diag tool
already reports on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-05-01 08:59:51 -07:00
parent cb1dc383b4
commit ce4d49caef
2 changed files with 60 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ bin/
/admin
/admin-reset
/notif-diag
/send-test-push
!admin/
*.exe
*.exe~