2013-11-06 10:52:18 +01:00
|
|
|
<?php
|
|
|
|
App::uses('AppShell', 'Console/Command');
|
|
|
|
class AdminShell extends AppShell
|
|
|
|
{
|
|
|
|
public $uses = array('Event');
|
2016-06-04 01:08:16 +02:00
|
|
|
|
2013-11-06 10:52:18 +01:00
|
|
|
public function jobGenerateCorrelation() {
|
2014-11-27 14:47:13 +01:00
|
|
|
$jobId = $this->args[0];
|
2013-11-06 10:52:18 +01:00
|
|
|
$this->loadModel('Job');
|
2014-11-27 14:47:13 +01:00
|
|
|
$this->Job->id = $jobId;
|
2013-11-06 10:52:18 +01:00
|
|
|
$this->loadModel('Attribute');
|
2015-12-17 10:25:30 +01:00
|
|
|
$this->Attribute->generateCorrelation($jobId, 0);
|
2013-11-06 10:52:18 +01:00
|
|
|
$this->Job->saveField('progress', 100);
|
|
|
|
$this->Job->saveField('message', 'Job done.');
|
2016-02-17 14:43:33 +01:00
|
|
|
$this->Job->saveField('status', 4);
|
|
|
|
}
|
2016-06-04 01:08:16 +02:00
|
|
|
|
2016-02-17 14:43:33 +01:00
|
|
|
public function jobGenerateShadowAttributeCorrelation() {
|
|
|
|
$jobId = $this->args[0];
|
|
|
|
$this->loadModel('Job');
|
|
|
|
$this->Job->id = $jobId;
|
|
|
|
$this->loadModel('ShadowAttribute');
|
|
|
|
$this->ShadowAttribute->generateCorrelation($jobId);
|
2013-11-06 10:52:18 +01:00
|
|
|
}
|
2016-06-04 01:08:16 +02:00
|
|
|
|
2015-09-02 01:34:52 +02:00
|
|
|
public function jobUpgrade24() {
|
|
|
|
$jobId = $this->args[0];
|
|
|
|
$user_id = $this->args[1];
|
|
|
|
$this->loadModel('Job');
|
|
|
|
$this->Job->id = $jobId;
|
|
|
|
$this->loadModel('Server');
|
|
|
|
$this->Server->upgrade2324($user_id, $jobId);
|
|
|
|
$this->Job->saveField('progress', 100);
|
|
|
|
$this->Job->saveField('message', 'Job done.');
|
2016-02-17 14:43:33 +01:00
|
|
|
$this->Job->saveField('status', 4);
|
2015-09-02 01:34:52 +02:00
|
|
|
}
|
2013-11-06 10:52:18 +01:00
|
|
|
}
|