mirror of https://github.com/MISP/MISP
Create new prio queue for publishing events
parent
009b0d0786
commit
117d001b2f
|
@ -2,6 +2,7 @@
|
|||
cd "${0%/*}"
|
||||
../cake CakeResque.CakeResque stop --all
|
||||
../cake CakeResque.CakeResque start --interval 5 --queue default
|
||||
../cake CakeResque.CakeResque start --interval 5 --queue prio
|
||||
../cake CakeResque.CakeResque start --interval 5 --queue cache
|
||||
../cake CakeResque.CakeResque start --interval 5 --queue email
|
||||
../cake CakeResque.CakeResque startscheduler -i 5
|
||||
|
|
|
@ -25,7 +25,7 @@ class JobsController extends AppController {
|
|||
if (!$this->_isSiteAdmin()) throw new MethodNotAllowedException();
|
||||
if (!Configure::read('MISP.background_jobs')) throw new NotFoundException('Background jobs are not enabled on this instance.');
|
||||
$this->recursive = 0;
|
||||
$queues = array('email', 'default', 'cache');
|
||||
$queues = array('email', 'default', 'cache', 'prio');
|
||||
if ($queue && in_array($queue, $queues)) $this->paginate['conditions'] = array('Job.worker' => $queue);
|
||||
$jobs = $this->paginate();
|
||||
foreach ($jobs as &$job) {
|
||||
|
|
|
@ -2165,7 +2165,7 @@ class Event extends AppModel {
|
|||
$job = ClassRegistry::init('Job');
|
||||
$job->create();
|
||||
$data = array(
|
||||
'worker' => 'default',
|
||||
'worker' => 'prio',
|
||||
'job_type' => 'publish_event',
|
||||
'job_input' => 'Event ID: ' . $id,
|
||||
'status' => 0,
|
||||
|
|
Loading…
Reference in New Issue