mirror of https://github.com/MISP/MISP
fix: [backgroundJobs] Added default fallback for settings & Use proper filepath when Redis not enabled
parent
6b638085ae
commit
d03dc9c73b
|
@ -89,7 +89,11 @@ abstract class AppShell extends Shell
|
|||
protected function getBackgroundJobsTool()
|
||||
{
|
||||
if (!isset($this->BackgroundJobsTool)) {
|
||||
$this->BackgroundJobsTool = new BackgroundJobsTool(Configure::read('SimpleBackgroundJobs'));
|
||||
$settings = ['enabled' => false];
|
||||
if (!empty(Configure::read('SimpleBackgroundJobs.enabled'))) {
|
||||
$settings = Configure::read('SimpleBackgroundJobs');
|
||||
}
|
||||
$this->BackgroundJobsTool = new BackgroundJobsTool($settings);
|
||||
}
|
||||
return $this->BackgroundJobsTool;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ class BackgroundJobsTool
|
|||
}
|
||||
RedisTool::unlink($this->RedisConnection, self::DATA_CONTENT_PREFIX . ':' . $uuid);
|
||||
return $data;
|
||||
} else if ($path[0] === '/') { // deprecated storage location when not full path is provided
|
||||
} else if ($path[0] !== '/') { // deprecated storage location when not full path is provided
|
||||
$path = APP . 'tmp/cache/ingest' . DS . $path;
|
||||
}
|
||||
return JsonTool::decode(FileAccessTool::readAndDelete($path));
|
||||
|
|
Loading…
Reference in New Issue