public function ServerTaskManager::getCount in Search API 8
Retrieves the number of pending server tasks.
Parameters
\Drupal\search_api\ServerInterface|null $server: (optional) The server whose tasks should be counted, or NULL to count all tasks.
Return value
int The number of tasks pending for this server, or in total.
Overrides ServerTaskManagerInterface::getCount
File
- src/
Task/ ServerTaskManager.php, line 80
Class
- ServerTaskManager
- Provides a service for managing pending server tasks.
Namespace
Drupal\search_api\TaskCode
public function getCount(ServerInterface $server = NULL) {
return $this->taskManager
->getTasksCount($this
->getTaskConditions($server));
}