get(Application::class); $worker = new PSR7Worker( Worker::create(), $container->get(ServerRequestFactoryInterface::class), $container->get(StreamFactoryInterface::class), $container->get(UploadedFileFactoryInterface::class), ); while ($req = $worker->waitRequest()) { try { $worker->respond($app->handle($req)); } catch (Throwable $e) { $worker->getWorker()->error((string) $e); } } } else { $container->get(RoadRunnerTaskConsumerToListener::class)->listenForTasks(); } })();