Coverage priorities 1-5: test pure functions, extract interfaces, mock-based handler tests
- Priority 1: Test NewSendEmailTask + NewSendPushTask (5 tests) - Priority 2: Test customHTTPErrorHandler — all 15+ branches (21 tests) - Priority 3: Extract Enqueuer interface + payload builders in worker pkg (5 tests) - Priority 4: Extract ClassifyFile/ComputeRelPath in migrate-encrypt (6 tests) - Priority 5: Define Handler interfaces, refactor to accept them, mock-based tests (14 tests) - Fix .gitignore: /worker instead of worker to stop ignoring internal/worker/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
24
cmd/worker/startup.go
Normal file
24
cmd/worker/startup.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import "github.com/treytartt/honeydue-api/internal/worker/jobs"
|
||||
|
||||
// queuePriorities returns the Asynq queue priority map.
|
||||
func queuePriorities() map[string]int {
|
||||
return map[string]int{
|
||||
"critical": 6,
|
||||
"default": 3,
|
||||
"low": 1,
|
||||
}
|
||||
}
|
||||
|
||||
// allJobTypes returns all registered job type strings.
|
||||
func allJobTypes() []string {
|
||||
return []string{
|
||||
jobs.TypeSmartReminder,
|
||||
jobs.TypeDailyDigest,
|
||||
jobs.TypeSendEmail,
|
||||
jobs.TypeSendPush,
|
||||
jobs.TypeOnboardingEmails,
|
||||
jobs.TypeReminderLogCleanup,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user