public function scheduleAsyncTaskToWorker(AsyncTask $task, $worker) { $id = $this->nextId(); $task->setTaskId($id); $this->asyncPool->submitTaskToWorker($task, $worker); }