get(Application::class); $worker = $container->get(PSR7Worker::class); while ($req = $worker->waitRequest()) { try { $worker->respond($app->handle($req)); } catch (Throwable $e) { $worker->getWorker()->error((string) $e); } } } else { $requestIdMiddleware = $container->get(RequestIdMiddleware::class); $container->get(RoadRunnerTaskConsumerToListener::class)->listenForTasks( fn (string $requestId) => $requestIdMiddleware->setCurrentRequestId($requestId), ); } })();