mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
fix negative frankenphp_ready_workers metrics (#1491)
This commit is contained in:
13
testdata/worker-restart.php
vendored
Normal file
13
testdata/worker-restart.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$fn = static function () {
|
||||
echo sprintf("Counter (%s)", $_GET['i'] ?? 'i not set');
|
||||
};
|
||||
|
||||
$loopMax = $_SERVER['EVERY'] ?? 10;
|
||||
$loops = 0;
|
||||
do {
|
||||
$ret = \frankenphp_handle_request($fn);
|
||||
} while ($ret && (-1 === $loopMax || ++$loops < $loopMax));
|
||||
|
||||
exit(0);
|
||||
Reference in New Issue
Block a user