|
@@ -232,15 +232,21 @@ class GearmanCacheWrapper
|
|
|
|
|
|
$reader = new SimpleAnnotationReader();
|
|
|
$reader->addNamespace('Mmoreram\GearmanBundle\Driver');
|
|
|
+ $workerCollection = new WorkerCollection;
|
|
|
+
|
|
|
+ if (!empty($this->paths)) {
|
|
|
|
|
|
- $finder = new Finder();
|
|
|
- $finder
|
|
|
- ->files()
|
|
|
- ->followLinks()
|
|
|
- ->exclude($this->excludedPaths)
|
|
|
- ->in($this->paths);
|
|
|
+ $finder = new Finder();
|
|
|
+ $finder
|
|
|
+ ->files()
|
|
|
+ ->followLinks()
|
|
|
+ ->exclude($this->excludedPaths)
|
|
|
+ ->in($this->paths);
|
|
|
|
|
|
- return $this->parseFiles($finder, $reader);
|
|
|
+ $workerCollection = $this->parseFiles($finder, $reader);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $workerCollection;
|
|
|
}
|
|
|
|
|
|
|