Compare commits
3 Commits
e498990393
...
v1.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 89efba8a82 | |||
| 7fbc1a364d | |||
| 378b0f5e4b |
@@ -96,13 +96,18 @@ class JobInspector
|
||||
$basePath = str_replace($file->getBasename(), '', $file->getBasePath());
|
||||
$name = $basePath . $file->getFilename();
|
||||
$className = str_replace('/', '\\', $basePath) . $file->getFilename();
|
||||
$classPath = "\\$sprinkleNS\\Worker\\Jobs\\$className";
|
||||
$classPath = "\\$sprinkleNS\\Jobs\\$className";
|
||||
|
||||
// Exclude known helper classes
|
||||
if ($className == "JobInterface" || $className == "JobBase" || $className == "JobInspector") {
|
||||
return null;
|
||||
}
|
||||
|
||||
$reflect = new \ReflectionClass($classPath);
|
||||
if ($reflect->isAbstract()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Build the class name and namespace
|
||||
return [
|
||||
'sprinkle' => $sprinkleName,
|
||||
|
||||
@@ -175,7 +175,7 @@ class Worker
|
||||
}
|
||||
|
||||
$this->queuedJob->save();
|
||||
} catch(Exception $ex) {
|
||||
} catch(\Exception $ex) {
|
||||
if ($this->debug) $this->debug->error('Job execution failed!', [$ex]);
|
||||
|
||||
$io->error('An exception occurred attempting to run a job');
|
||||
|
||||
Reference in New Issue
Block a user