feat: dequeue worker request on timeout by Tolsee · Pull Request #1540 · php/frankenphp
Tolsee
marked this pull request as ready for review
Tolsee
changed the title
feat: add test case for
feat: dequeue worker request on timeoutmax_wait_time
| rw.(http.Flusher).Flush() | ||
|
|
||
| if f, ok := rw.(http.Flusher); ok { | ||
| f.Flush() |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| case scaleChan <- fc: | ||
| // the request has triggered scaling, continue to wait for a thread | ||
| case <-timeoutChan(maxWaitTime): | ||
| metrics.DequeuedWorkerRequest(worker.name) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍, you can probably also add this line in threadregular.go (for non-worker requests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters