projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef6f9ab
)
Notify.php
author
Alan Knowles
<alan@roojs.com>
Wed, 26 Mar 2014 05:58:07 +0000
(13:58 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 26 Mar 2014 05:58:07 +0000
(13:58 +0800)
Notify.php
patch
|
blob
|
history
diff --git
a/Notify.php
b/Notify.php
index
e33ad7f
..
4218ccb
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-200,7
+200,7
@@
class Pman_Core_Notify extends Pman
$o = $w->object();
$o = $w->object();
- $this->log("$w->id : $w->person_id_email email : ".
+ $this->log
echo
("$w->id : $w->person_id_email email : ".
$o->toEventString()." ". $w->status() );
}
exit;
$o->toEventString()." ". $w->status() );
}
exit;
@@
-212,10
+212,10
@@
class Pman_Core_Notify extends Pman
while (true) {
while (true) {
- $this->log("BATCH SIZE: ". count($ar) );
+ $this->log
echo
("BATCH SIZE: ". count($ar) );
if (empty($ar)) {
if (empty($ar)) {
- $this->log("COMPLETED MAIN QUEUE - running delated");
+ $this->log
echo
("COMPLETED MAIN QUEUE - running delated");
if (empty($pushed)) {
break;
if (empty($pushed)) {
break;
@@
-310,7
+310,7
@@
class Pman_Core_Notify extends Pman
$pipe = array();
$pipe = array();
- $this->log("call proc_open $cmd");
+ $this->log
echo
("call proc_open $cmd");
if ($this->max_pool_size === 1) {
if ($this->max_pool_size === 1) {
@@
-320,7
+320,7
@@
class Pman_Core_Notify extends Pman
if (!empty($this->opts['dryrun'])) {
if (!empty($this->opts['dryrun'])) {
- $this->log("DRY RUN");
+ $this->log
echo
("DRY RUN");
return;
}
return;
}
@@
-342,7
+342,7
@@
class Pman_Core_Notify extends Pman
);
);
- $this->log("RUN ({$info['pid']}) $cmd ");
+ $this->log
echo
("RUN ({$info['pid']}) $cmd ");
}
function poolfree()
}
function poolfree()
@@
-359,7
+359,7
@@
class Pman_Core_Notify extends Pman
// update if necessday.
if ($info['pid'] && $p['pid'] != $info['pid']) {
// update if necessday.
if ($info['pid'] && $p['pid'] != $info['pid']) {
- $this->log("CHANING PID FROM " . $p['pid'] . " TO ". $info['pid']);
+ $this->log
echo
("CHANING PID FROM " . $p['pid'] . " TO ". $info['pid']);
$p['pid'] = $info['pid'];
}
$p['pid'] = $info['pid'];
}
@@
-376,7
+376,7
@@
class Pman_Core_Notify extends Pman
//fclose($p['pipes'][1]);
fclose($p['pipes'][0]);
fclose($p['pipes'][2]);
//fclose($p['pipes'][1]);
fclose($p['pipes'][0]);
fclose($p['pipes'][2]);
- $this->log("TERMINATING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']));
+ $this->log
echo
("TERMINATING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']));
@unlink($p['out']);
continue;
@unlink($p['out']);
continue;
@@
-398,11
+398,11
@@
class Pman_Core_Notify extends Pman
// $pool[] = $p;
// continue;
//}
// $pool[] = $p;
// continue;
//}
- $this->log("ENDED: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']) );
+ $this->log
echo
("ENDED: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']) );
@unlink($p['out']);
//unlink($p['out']);
}
@unlink($p['out']);
//unlink($p['out']);
}
- $this->log("POOL SIZE: ". count($pool) );
+ $this->log
echo
("POOL SIZE: ". count($pool) );
$this->pool = $pool;
if (count($pool) < $this->max_pool_size) {
return true;
$this->pool = $pool;
if (count($pool) < $this->max_pool_size) {
return true;
@@
-433,7
+433,7
@@
class Pman_Core_Notify extends Pman
{
die("Done\n");
}
{
die("Done\n");
}
- function log($str)
+ function log
echo
($str)
{
echo date("Y-m-d H:i:s - $str\n");
}
{
echo date("Y-m-d H:i:s - $str\n");
}