mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
17 lines
394 B
PHP
17 lines
394 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../_executor.php';
|
|
|
|
return function () {
|
|
$taskCount = $_GET['count'] ?? 0;
|
|
$workerName = $_GET['worker'] ?? '';
|
|
for ($i = 0; $i < $taskCount; $i++) {
|
|
frankenphp_dispatch_task([
|
|
'task' => "array task$i",
|
|
'worker' => $workerName,
|
|
'index' => $i,
|
|
]);
|
|
}
|
|
echo "dispatched $taskCount tasks\n";
|
|
};
|