(ctx context.Context, t *asynq.Task)
| 52 | } |
| 53 | |
| 54 | func (p *SMSPayload) ProcessTask(ctx context.Context, t *asynq.Task) error { |
| 55 | if err := json.Unmarshal(t.Payload(), p); err != nil { |
| 56 | return fmt.Errorf("failed to unmarshal payload: %w", err) |
| 57 | } |
| 58 | log.Printf("[SMS] Task for UserID %d completed successfully", p.UserID) |
| 59 | return nil |
| 60 | } |
| 61 | |
| 62 | type MsgNotificationPayload struct { |
| 63 | UserID int `json:"user_id"` |
no test coverage detected