function submitTask(\CharlotteDunois\Phoebe\AsyncTask $task) {
        if(!$task->id) {
            throw new \InvalidArgumentException('Async Task has no ID - did you call parent::__construct() in your constructor?');
        }
        
        return $this->submit($task)->then(function (\CharlotteDunois\Phoebe\Worker $worker) use (&$task) {
            $itask = new \CharlotteDunois\Phoebe\InternalTask($worker, $task);
            $this->tasks->set($task->id, $itask);
            
            return $itask->getDeferred()->promise();
        });
    }