projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d1398c
)
Notify.php
author
Alan Knowles
<alan@roojs.com>
Tue, 29 Apr 2014 10:15:19 +0000
(18:15 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 29 Apr 2014 10:15:19 +0000
(18:15 +0800)
Notify.php
patch
|
blob
|
history
diff --git
a/Notify.php
b/Notify.php
index
8d13d28
..
9c5ecf9
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-101,7
+101,8
@@
class Pman_Core_Notify extends Pman
/**
* @var $maxruntime - maximum time a child is allowed to run - defaut 2 minutes
*/
/**
* @var $maxruntime - maximum time a child is allowed to run - defaut 2 minutes
*/
- var $maxruntime = 120;
+ var $maxruntime = 120;
+
var $table = 'core_notify';
var $target = 'Core/NotifySend';
var $evtype = ''; // any notification...
var $table = 'core_notify';
var $target = 'Core/NotifySend';
var $evtype = ''; // any notification...
@@
-353,8
+354,7
@@
class Pman_Core_Notify extends Pman
{
$pool = array();
clearstatcache();
{
$pool = array();
clearstatcache();
- $maxruntime = 2 * 60; // 2 minutes.. ?? should be long enoguh
-
+
foreach($this->pool as $p) {
//echo "CHECK PID: " . $p['pid'] . "\n";
foreach($this->pool as $p) {
//echo "CHECK PID: " . $p['pid'] . "\n";
@@
-374,7
+374,7
@@
class Pman_Core_Notify extends Pman
//if (file_exists('/proc/'.$p['pid'])) {
$runtime = time() - $p['started'];
//echo "RUNTIME ({$p['pid']}): $runtime\n";
//if (file_exists('/proc/'.$p['pid'])) {
$runtime = time() - $p['started'];
//echo "RUNTIME ({$p['pid']}): $runtime\n";
- if ($runtime > $maxruntime) {
+ if ($runtime > $
this->
maxruntime) {
proc_terminate($p['proc'], 9);
//fclose($p['pipes'][1]);
proc_terminate($p['proc'], 9);
//fclose($p['pipes'][1]);