aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-08-30 13:10:03 +0200
committerChristian Weiske <cweiske@cweiske.de>2016-08-30 13:10:03 +0200
commitf77dad8f1dda382a23b9d22393e239be6c087a07 (patch)
tree398d9d418ff62618ff6a54be93c8c30c0a17faf0 /bin
parentba1f6fc77827dba86b1ac0b62aa288dd0f977cb8 (diff)
downloadphinde-f77dad8f1dda382a23b9d22393e239be6c087a07.tar.gz
phinde-f77dad8f1dda382a23b9d22393e239be6c087a07.zip
Allow worker instances of multiple projects in parallel
Change "queuePrefix" configuration in each project Resolves: #5
Diffstat (limited to 'bin')
-rwxr-xr-xbin/phinde-worker.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/phinde-worker.php b/bin/phinde-worker.php
index 7adb7af..939db1f 100755
--- a/bin/phinde-worker.php
+++ b/bin/phinde-worker.php
@@ -32,7 +32,7 @@ $gmworker->addServer('127.0.0.1');
if (isset($queues['crawl'])) {
$gmworker->addFunction(
- 'phinde_crawl',
+ $GLOBALS['phinde']['queuePrefix'] . 'phinde_crawl',
function(\GearmanJob $job) {
$data = unserialize($job->workload());
echo "-- Crawling " . $data['url'] . "\n";
@@ -42,7 +42,7 @@ if (isset($queues['crawl'])) {
}
if (isset($queues['index'])) {
$gmworker->addFunction(
- 'phinde_index',
+ $GLOBALS['phinde']['queuePrefix'] . 'phinde_index',
function(\GearmanJob $job) {
$data = unserialize($job->workload());
echo "-- Indexing " . $data['url'] . "\n";