mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 07:36:37 +08:00
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:
@@ -209,7 +209,7 @@ func SendEmailCode(c *gin.Context) {
|
||||
}
|
||||
ctx := c.Request.Context()
|
||||
if taskSvc := getTaskService(ctx); taskSvc != nil {
|
||||
if _, err := taskSvc.Dispatch(ctx, TaskTypeSendEmailCode, payload, "http"); err != nil {
|
||||
if _, err := taskSvc.Dispatch(ctx, TaskTypeSendEmailCode, payload, contracts.TaskTriggerSystem); err != nil {
|
||||
logger.ErrorF(ctx, "dispatch send_email_code failed: %v", err)
|
||||
response.AbortInternal(c, errSendEmailFailed)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user