mirror of https://github.com/MISP/MISP
fix: update to the caching task
parent
3c0f3fb8bb
commit
45ba2b3f7c
|
@ -40,6 +40,12 @@ class TasksController extends AppController {
|
|||
if (!in_array($taskName, $existingTasks)) {
|
||||
$this->Task->create();
|
||||
$this->Task->save($taskData);
|
||||
} else {
|
||||
$existingTask = $this->Task->find('first', array('recursive' => -1, 'conditions' => array('Task.type' => $taskName)));
|
||||
if ($taskData['description'] != $existingTask['Task']['description']) {
|
||||
$existingTask['Task']['description'] = $taskData['description'];
|
||||
$this->Task->save($existingTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class Task extends AppModel {
|
|||
'timer' => 0,
|
||||
'scheduled_time' => '12:00',
|
||||
'process_id' => '',
|
||||
'description' => 'Generates export caches for every export type and for every organisation. This process is heavy, schedule so it might be a good idea to schedule this outside of working hours and before your daily automatic imports on connected services are scheduled.',
|
||||
'description' => 'Generates export caches for every export type and for every organisation. This process is heavy and it is highly advised to leave export cache generation as an on-demand function for users. STIX export not included.',
|
||||
'next_execution_time' => 1391601600,
|
||||
'message' => 'Not scheduled yet.'
|
||||
|
||||
|
|
Loading…
Reference in New Issue