aboutsummaryrefslogtreecommitdiff
path: root/src/phinde/Queue.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-11-10 20:52:35 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-11-10 20:52:35 +0100
commit696fcd7ce4d495e356667019493bf312e2a6e47b (patch)
tree3e8d60dad08dbe31660f2532d8ce893d35d50130 /src/phinde/Queue.php
parent9ff01ebe8cde0a07ad2a480d1a45eb1a29cb113d (diff)
downloadphinde-696fcd7ce4d495e356667019493bf312e2a6e47b.tar.gz
phinde-696fcd7ce4d495e356667019493bf312e2a6e47b.zip
add log class
Diffstat (limited to 'src/phinde/Queue.php')
-rw-r--r--src/phinde/Queue.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/phinde/Queue.php b/src/phinde/Queue.php
index 6c30faa..a58a257 100644
--- a/src/phinde/Queue.php
+++ b/src/phinde/Queue.php
@@ -13,9 +13,11 @@ class Queue
public function addToProcessList($linkUrl, $actions)
{
- echo "Queuing for processing: $linkUrl"
+ Log::info(
+ "Queuing for processing: $linkUrl"
. ' (' . implode(',', $actions) . ')'
- . "\n";
+ );
+
$this->gmclient->doBackground(
$GLOBALS['phinde']['queuePrefix'] . 'phinde_process',
serialize(
@@ -26,9 +28,11 @@ class Queue
)
);
if ($this->gmclient->returnCode() != GEARMAN_SUCCESS) {
- echo 'Error queueing URL processing for '
+ Log::error(
+ 'Error queueing URL processing for '
. $linkUrl . "\n"
- . 'Error code: ' . $this->gmclient->returnCode() . "\n";
+ . 'Error code: ' . $this->gmclient->returnCode()
+ );
exit(2);
}
}