Adding ability to get list of initialized queues.

This commit is contained in:
2014-08-11 12:42:17 -05:00
parent 89cb1ae4b1
commit d33fd6bcba
2 changed files with 31 additions and 1 deletions

View File

@@ -361,7 +361,23 @@ HTML;
*/
public function queueExists($groupName)
{
return (bool)is_dir($this->getQueueBaseDir().$groupName);
return (bool)is_dir($this->queueBaseDir.$groupName);
}
/**
* @return array
*/
public function getInitializedQueueList()
{
$queueList = array();
foreach(glob(realpath($this->queueBaseDir).DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR) as $queueDir)
{
$exp = explode(DIRECTORY_SEPARATOR, $queueDir);
$dir = end($exp);
if (strpos($dir, '.') !== 0)
$queueList[] = $dir;
}
return $queueList;
}
/**