fix(tasks): canonicalize triggered_by so execution labels resolve

Unknown values such as http and inproc_cron made the admin UI call
t(undefined). Dispatch sites now write system/manual/retry/schedule,
the list API maps legacy rows, and the table skips missing i18n keys.
This commit is contained in:
ryan
2026-09-02 18:04:32 +08:00
parent 1f1f4efec7
commit df7ad453cc
9 changed files with 90 additions and 16 deletions
@@ -697,7 +697,7 @@ func EnqueuePushTask(ctx context.Context, payload model.SendPayload) error {
return err
}
if taskSvc := GetTaskService(ctx); taskSvc != nil {
_, err = taskSvc.Dispatch(ctx, "send_notification", payloadBytes, "system")
_, err = taskSvc.Dispatch(ctx, "send_notification", payloadBytes, contracts.TaskTriggerSystem)
return err
}
return errors.New(errs.ErrTaskServiceUnavailable)