*** empty log message ***
This commit is contained in:
parent
1fa2748b61
commit
fdc676fc05
1 changed files with 15 additions and 13 deletions
|
@ -26,7 +26,7 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
$this->uiCalendar();
|
$this->uiCalendar();
|
||||||
$this->initXmlRpc();
|
$this->initXmlRpc();
|
||||||
|
|
||||||
$this->startDaemon();
|
$this->startDaemon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,28 +45,28 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
function startDaemon($msg=FALSE)
|
function startDaemon($msg=FALSE)
|
||||||
{
|
{
|
||||||
if ($this->testDaemon($msg) === TRUE)
|
if ($this->testDaemon($msg) === TRUE)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
exec(UI_SCHEDULER_DAEMON_CMD);
|
exec(UI_SCHEDULER_DAEMON_CMD);
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
if ($this->testDaemon($msg)===FALSE) {
|
if ($this->testDaemon($msg)===FALSE) {
|
||||||
if ($msg) $this->Base->_retMsg('Scheduler did not start. Check setting of "UI_SCHEDULER_DAEMON_CMD" in ui_conf.php. File "/tmp/scheduler.log" could be helpful.');
|
if ($msg) $this->Base->_retMsg('Scheduler did not start. Check setting of "UI_SCHEDULER_DAEMON_CMD" in ui_conf.php. File "/tmp/scheduler.log" could be helpful.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDaemon($msg=FALSE)
|
function testDaemon($msg=FALSE)
|
||||||
{
|
{
|
||||||
exec('ps -A', $output);
|
exec('ps -A', $output);
|
||||||
foreach ($output as $l) {
|
foreach ($output as $l) {
|
||||||
if (preg_match("/ ".UI_SCHEDULER_DAEMON_NAME."$/", $l)) {
|
if (preg_match("/ ".UI_SCHEDULER_DAEMON_NAME."$/", $l)) {
|
||||||
if ($msg) $this->Base->_retMsg('Scheduler is running.');
|
if ($msg) $this->Base->_retMsg('Scheduler is running.');
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,8 +383,8 @@ class uiScheduler extends uiCalendar
|
||||||
|
|
||||||
if (!$clip['gunid']) return FALSE;
|
if (!$clip['gunid']) return FALSE;
|
||||||
|
|
||||||
list($duration['h'], $duration['m'], $duration['s']) = explode(':', $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_DURATION));
|
list($duration['h'], $duration['m'], $duration['s']) = explode(':', $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_DURATION));
|
||||||
list($elapsed['h'], $elapsed['m'], $elapsed['s']) = explode(':', $clip['elapsed']);
|
list($elapsed['h'], $elapsed['m'], $elapsed['s']) = explode(':', $clip['elapsed']);
|
||||||
list($remaining['h'], $remaining['m'], $remaining['s']) = explode(':', $clip['remaining']);
|
list($remaining['h'], $remaining['m'], $remaining['s']) = explode(':', $clip['remaining']);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
@ -392,7 +392,9 @@ class uiScheduler extends uiCalendar
|
||||||
'duration' => $duration,
|
'duration' => $duration,
|
||||||
'elapsed' => $elapsed,
|
'elapsed' => $elapsed,
|
||||||
'remaining' => $remaining,
|
'remaining' => $remaining,
|
||||||
'percentage'=> 100 * $this->Base->gb->_plTimeToSecs($clip['elapsed']) / ( $this->Base->gb->_plTimeToSecs($clip['elapsed']) + $this->Base->gb->_plTimeToSecs($clip['remaining']))
|
'percentage'=> $this->Base->gb->_plTimeToSecs($clip['elapsed'])
|
||||||
|
? 100 * $this->Base->gb->_plTimeToSecs($clip['elapsed']) / ( $this->Base->gb->_plTimeToSecs($clip['elapsed']) + $this->Base->gb->_plTimeToSecs($clip['remaining']))
|
||||||
|
: 100
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue