update cron->ajaxExec method
This commit is contained in:
@@ -15,4 +15,4 @@ $config->repo->binary = '|pdf|';
|
||||
|
||||
$config->repo->requiredFields = 'name,repo,buildType,jenkins,jenkinsTask,triggerType';
|
||||
|
||||
$config->repo->commitCommands = array(build=>'Build #12345', entity=>'/(.*)\s(?:(?:requirement)|(?:task)|(?:Bug))\s?#(.*)/Ui');
|
||||
$config->repo->commitCommands = array(entity=>'/(.*)\s(?:(?:requirement)|(?:task)|(?:Bug))\s?#(.*)/Ui');
|
||||
@@ -347,6 +347,8 @@ class ci extends control
|
||||
*/
|
||||
public function exeCitask($id)
|
||||
{
|
||||
error_log("===exeCitask " . $id);
|
||||
|
||||
$this->ci->exeCitask($id);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
@@ -362,7 +364,7 @@ class ci extends control
|
||||
*/
|
||||
public function checkCibuild()
|
||||
{
|
||||
error_log("checkCibuild...");
|
||||
error_log("===checkCibuild");
|
||||
|
||||
$this->ci->checkCibuild();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
+3
-3
@@ -238,7 +238,7 @@ class ciModel extends model
|
||||
}
|
||||
|
||||
$cron = (object) array('m'=>$min, 'h'=>$hour, 'dom'=>'*', 'mon'=>'*',
|
||||
'dow'=> $days . '/' . $task->scheduleInterval, 'command'=>'moduleName=ci&methodName=exeCitask&id=' . $taskId,
|
||||
'dow'=> $days . '/' . $task->scheduleInterval, 'command'=>'moduleName=ci&methodName=exeCitask¶ms=' . $taskId,
|
||||
'remark'=>($this->lang->citask->extTask . $taskId), 'type'=>'zentao',
|
||||
'buildin'=>'-1', 'status'=>'normal', 'lastTime'=>'0000-00-00 00:00:00');
|
||||
$this->dao->insert(TABLE_CRON)->data($cron)->exec();
|
||||
@@ -282,9 +282,9 @@ class ciModel extends model
|
||||
if ($task->scheduleDay == 'everyDay') {
|
||||
$days = '1-7';
|
||||
} else if ($task->scheduleDay == 'workDay') {
|
||||
$days = '1-5';
|
||||
$days = '2-6';
|
||||
}
|
||||
$command = 'moduleName=ci&methodName=exeCitask&id=' . $id;
|
||||
$command = 'moduleName=ci&methodName=exeCitask¶ms=' . $id;
|
||||
|
||||
$this->dao->update(TABLE_CRON)
|
||||
->set('m')->eq($min)
|
||||
|
||||
@@ -201,7 +201,8 @@ class cron extends control
|
||||
if(isset($params['moduleName']) and isset($params['methodName']))
|
||||
{
|
||||
$this->app->loadConfig($params['moduleName']);
|
||||
$output = $this->fetch($params['moduleName'], $params['methodName']);
|
||||
$paramArr = explode(",", $params['parm']);
|
||||
$output = $this->fetch($params['moduleName'], $params['methodName'], $paramArr);
|
||||
}
|
||||
}
|
||||
elseif(isset($crons[$id]) and $crons[$id]->type == 'system')
|
||||
|
||||
@@ -33,7 +33,7 @@ class cronModel extends model
|
||||
public function getCrons($params = '')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_CRON)
|
||||
->where('1=1')
|
||||
->where('id=16')
|
||||
->beginIF(strpos($params, 'nostop') !== false)->andWhere('status')->ne('stop')->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user