Skip to content

Commit

Permalink
remove inflight cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-lombardi committed Oct 6, 2024
1 parent e3778b7 commit 24ec8b2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/abstractions/endpoint/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func (rb *RequestBuffer) ForwardRequest(ctx echo.Context, task *EndpointTask) er
return nil
case <-done:
return nil
case <-time.After(requestProcessingInterval):
}
}
}
Expand Down Expand Up @@ -478,14 +477,7 @@ func (rb *RequestBuffer) heartBeat(req request, containerId string) {
rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId), containerId, endpointRequestHeartbeatInterval)
for {
select {
case <-req.done:
return
case <-ctx.Done():
if err := req.ctx.Request().Context().Err(); err == context.Canceled {
rb.cancelInFlightTask(req.task)
return
}

return
case <-ticker.C:
rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId), containerId, endpointRequestHeartbeatInterval)
Expand Down

0 comments on commit 24ec8b2

Please sign in to comment.