public function addTaskListeners($task, $event, $listeners, $priority = 0)
    {
        // Recursive call
        if (is_array($task)) {
            foreach ($task as $t) {
                $this->addTaskListeners($t, $event, $listeners, $priority);
            }

            return;
        }

        // Cancel if no listeners
        if (!$listeners) {
            return;
        }

        // Prevent events on anonymous tasks
        $task = $this->builder->buildTask($task);
        if ($task->getSlug() === 'closure') {
            return;
        }

        // Get event name and register listeners
        $event = $this->getEventHandle($task, $event);
        $event = $this->listenTo($event, $listeners, $priority);

        return $event;
    }