$sn = $_SERVER["SCRIPT_NAME"];
$cwd = $sn[0] == '/' ? dirname($sn) : dirname(realpath(getcwd() . '/'. $sn)); // same as run on.. (so script should end up being same relatively..)
- print_R(getcwd() . '/'. $sn);exit;
$app = $cwd . '/' . basename($_SERVER["SCRIPT_NAME"]) . ' ' . $this->target . '/'. $id;
if ($this->force) {
$app .= ' -f';
'cmd' => $cmd,
'email' => $email,
'pipes' => $pipes,
+ 'notify_id' => $id,
'started' => time()
$this->logecho("TERMINATING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']));
@unlink($p['out']);
+ $w = DB_DataObject::factory($this->table);
+ $w->get($p['notify_id']);
+ $ww = clone($w);
+ $this->addEvent('NOTIFY', $w, 'TERMINATED - TIMEOUT');
+ $w->act_when = date('Y-m-d H:i:s', strtotime('NOW + 30 MINUTES'));
+ $w->update($ww);
+
+
continue;
}