aboutsummaryrefslogtreecommitdiff
path: root/bin/stop-worker.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/stop-worker.php')
-rwxr-xr-xbin/stop-worker.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/stop-worker.php b/bin/stop-worker.php
new file mode 100755
index 0000000..48a2fe1
--- /dev/null
+++ b/bin/stop-worker.php
@@ -0,0 +1,12 @@
+#!/usr/bin/env php
+<?php
+//stop a single running worker
+namespace phinde;
+require_once __DIR__ . '/../src/init.php';
+
+$gmclient = new \GearmanClient();
+$gmclient->addServer('127.0.0.1');
+$gmclient->doHigh(
+ $GLOBALS['phinde']['queuePrefix'] . 'phinde_quit', 'none'
+);
+?>