Returns all possible Queue tasks.

Makes sure that app tasks are prioritized over plugin ones.

@return array
760002
public function allAppAndPluginTasks() {
		if ($this->tasks !== null) {
			return $this->tasks;
		}

		$paths = App::path('Shell/Task');
		$this->tasks = [];

		foreach ($paths as $path) {
			$Folder = new Folder($path);
			$this->tasks = $this->getAppPaths($Folder);
		}
		$plugins = Plugin::loaded();
		foreach ($plugins as $plugin) {
			$pluginPaths = App::path('Shell/Task', $plugin);
			foreach ($pluginPaths as $pluginPath) {
				$Folder = new Folder($pluginPath);
				$pluginTasks = $this->getPluginPaths($Folder, $plugin);
				$this->tasks = array_merge($this->tasks, $pluginTasks);
			}
		}

		return $this->tasks;
	}
1290339
protected function _getTaskConf() {
		if (!is_array($this->_taskConf)) {
			$this->_taskConf = [];
			foreach ($this->tasks as $task) {
				list($pluginName, $taskName) = pluginSplit($task);

				$this->_taskConf[$taskName]['name'] = substr($taskName, 5);
				$this->_taskConf[$taskName]['plugin'] = $pluginName;
				if (property_exists($this->{$taskName}, 'timeout')) {
					$this->_taskConf[$taskName]['timeout'] = $this->{$taskName}->timeout;
				} else {
					$this->_taskConf[$taskName]['timeout'] = Config::defaultworkertimeout();
				}
				if (property_exists($this->{$taskName}, 'retries')) {
					$this->_taskConf[$taskName]['retries'] = $this->{$taskName}->retries;
				} else {
					$this->_taskConf[$taskName]['retries'] = Config::defaultworkerretries();
				}
				if (property_exists($this->{$taskName}, 'rate')) {
					$this->_taskConf[$taskName]['rate'] = $this->{$taskName}->rate;
				}
			}
		}
		return $this->_taskConf;
	}
1367458
public function getListQueued()
    {
        $params = ['status' => 'queued'];

        $response = $this->client->fetch(
            $this->uri,
            $params
        );

        $queuedCallUuids = $response->getContent()['calls'];

        return $queuedCallUuids;
    }
1184498
public function listTasks($project, $taskqueue, $optParams = array())
  {
    $params = array('project' => $project, 'taskqueue' => $taskqueue);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Taskqueue_Tasks2");
  }
1023173
protected function executeQueuedJobs()
    {
        $returnValues = [];
        while ($resumeCommand = array_shift($this->queue)) {
            $returnValues[] = $resumeCommand();
        }

        return array_shift($returnValues);
    }
743833
protected function getTaskChannels() {
        if (!$this->_taskChannels) {
            $this->_taskChannels = new TaskChannelList($this->version, $this->solution['sid']);
        }

        return $this->_taskChannels;
    }
930371
protected function getStatistics() {
        if (!$this->_statistics) {
            $this->_statistics = new TaskQueueStatisticsList(
                $this->version,
                $this->solution['workspaceSid'],
                $this->solution['sid']
            );
        }

        return $this->_statistics;
    }
572247
public function get()
    {
        $processes = $this->processes();

        return collect($this->waitTime->calculate())
            ->map(function ($waitTime, $queue) use ($processes) {
                [$connection, $queueName] = explode(':', $queue, 2);

                $length = ! Str::contains($queue, ',')
                    ? $this->queue->connection($connection)->readyNow($queueName)
                    : collect(explode(',', $queueName))->sum(function ($queueName) use ($connection) {
                        return $this->queue->connection($connection)->readyNow($queueName);
                    });

                return [
                    'name' => $queueName,
                    'length' => $length,
                    'wait' => $waitTime,
                    'processes' => $processes[$queue] ?? 0,
                ];
            })->values()->toArray();
    }
742406
protected static function _discover_tasks()
	{
		$result = array();
		$files = \Finder::instance()->list_files('tasks');

		if (count($files) > 0)
		{
			foreach ($files as $file)
			{
				$task_name = str_replace('.php', '', basename($file));
				$class_name = '\\Fuel\\Tasks\\'.$task_name;

				require $file;

				$reflect = new \ReflectionClass($class_name);

				// Ensure we only pull out the public methods
				$methods = $reflect->getMethods(\ReflectionMethod::IS_PUBLIC);

				$result[$task_name] = array();

				if (count($methods) > 0)
				{
					foreach ($methods as $method)
					{
						strpos($method->name, '_') !== 0 and $result[$task_name][] = $method->name;
					}
				}
			}
		}

		return $result;
	}
129590
public static function taskLocations()
    {
        $locations = array_merge(
            [self::projectRoot()],
            self::getEngineType()->taskDirectories(),
            self::getProjectType()->taskDirectories(),
            self::getPlatformType()->taskDirectories()
        );

        if (self::hasProjectConfig()) {
            $locations[] = APP_ROOT . '/src/Task';
        }

        return array_filter($locations);
    }
345592
public function getSchedule()
    {
        $list = [];

        foreach ($this->schedule as $time => $jobs) {
            foreach ($jobs as $job) {
                $list[$time][] = $job->getId();
            }
        }

        return $list;
    }
838060
public function pendingTasks()
    {
        $request = $this->createRequestInstance(self::CAT_PENDING_TASKS, null, null);

        return $this->client->send($request);
    }
1226529
public function getAllTasks()
    {
        $result = $this->callService('GET', self::API_FS_TASK);

        return $result->getModels(models\FileSystem\FsTask::class);
    }
691459
protected function getFailedJobs()
	{
		$results = [];

		foreach ($this->laravel['queue.failer']->all() as $failed) {
			$results[] = $this->parseFailedJob((array) $failed);
		}

		return array_filter($results);
	}
1112763
protected function getStatics(){

        $statics = [];

        if ($this->monitorOptions['monitorOn']['jobs']) {
            // TODO
        }

        if ($this->monitorOptions['monitorOn']['queues']) {
            $statics['queues']  = $this->getQueueStatics();
        }

        if ($this->monitorOptions['monitorOn']['workers']) {
            $statics['workers']  = $this->getWorkerStatics();
        }

        if ($this->monitorOptions['monitorOn']['server']) {
            $statics['server']   = $this->getServerStatics();
        }


        return $statics;
    }
1174337
public function getAll()
    {
        $result = $this->callService('GET', self::API_DOWNLOAD);

        return $result->getModels(models\Download\Task::class);
    }
754256
public function getOptions()
    {
        $ret = array();
        if (!empty($this->taskDef['opts'])) {
            foreach ($this->taskDef['opts'] as $opt) {
                $ret[] = $opt->name;
            }
        }
        return $ret;
    }