feat: dequeue worker request on timeout by Tolsee · Pull Request #1540 · php/frankenphp

@Tolsee

@Tolsee Tolsee marked this pull request as ready for review

May 7, 2025 01:21

Tolsee

@Tolsee

Not sure, why the builds are failing.

@AlliBalliBaba

@dunglas

It would be nice to automatically use the latest patch version.

@Tolsee Tolsee changed the title feat: add test case for max_wait_time feat: dequeue worker request on timeout

May 9, 2025

@Tolsee

dunglas

AlliBalliBaba

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)