Fixes for ADSL traffic collection and other ADSL items

This commit is contained in:
Deon George
2013-01-11 21:51:37 +11:00
parent 94b7b4bcd4
commit 7819a05515
16 changed files with 38 additions and 36 deletions

View File

@@ -17,7 +17,7 @@ class Model_Task extends ORM_OSB {
),
);
public function run() {
public function run($force=FALSE) {
$r = rand(0,9999);
$tlo = ORM::factory('Task_Log');
$tlo->task_id = $this->id;
@@ -28,7 +28,7 @@ class Model_Task extends ORM_OSB {
elseif (! $this->status)
$tlo->message = sprintf('Task %s is not active',$this->id);
elseif ($this->running)
elseif ($this->running AND ! $force)
$tlo->message = sprintf('Task %s is already running',$this->id);
elseif (! preg_match('/\//',$this->command))