MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / ProcessTask

Method ProcessTask

pkg/sasynq/server_test.go:54–60  ·  view source on GitHub ↗
(ctx context.Context, t *asynq.Task)

Source from the content-addressed store, hash-verified

52}
53
54func (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
62type MsgNotificationPayload struct {
63 UserID int `json:"user_id"`

Callers 1

LoggingMiddlewareFunction · 0.80

Calls 3

ErrorfMethod · 0.80
PrintfMethod · 0.80
UnmarshalMethod · 0.65

Tested by

no test coverage detected