修复批量订购
This commit is contained in:
@@ -38,11 +38,13 @@ func completeGatewayAttempt(ctx context.Context, repository *integrationlog.Repo
|
||||
if repository == nil || attempt == nil {
|
||||
return errors.New(errors.CodeInternalError, "Gateway Integration Log 尝试不存在")
|
||||
}
|
||||
completionCtx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second)
|
||||
defer cancel()
|
||||
result := constants.IntegrationResultFailed
|
||||
if success {
|
||||
result = constants.IntegrationResultSuccess
|
||||
}
|
||||
_, err := repository.Complete(ctx, attempt.IntegrationID, integrationlog.Completion{
|
||||
_, err := repository.Complete(completionCtx, attempt.IntegrationID, integrationlog.Completion{
|
||||
Result: result, DurationMS: time.Since(startedAt).Milliseconds(), StateChanged: false,
|
||||
ResponseSummary: map[string]any{"success": success},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user