feat: add durable relative task delays and outage recovery regression

This commit is contained in:
2026-09-17 23:43:57 +08:00
parent 522fe2ef3e
commit a664ec9370
34 changed files with 811 additions and 28 deletions

View File

@@ -221,7 +221,8 @@ func insertAcceptedTask(ctx context.Context, tx *sql.Tx, ns, taskID core.ID, in
if err != nil {
return service.TaskView{}, err
}
available := now
// 相对时长保留在请求摘要中,只在首次受理时按数据库时钟转换;重报先返回原回执。
available := now.Add(time.Duration(in.DelayMS) * time.Millisecond)
if in.AvailableAt != nil {
available = *in.AvailableAt
}