summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-07-21 14:45:13 +0200
committerBjörn Geiger2011-07-21 14:45:13 +0200
commit74cc50c86f3979303d7a062e53fd36486eb645f4 (patch)
treef75e980127ce4b27998732940caca936cdadceeb /application
parentsomePingWorker PHP gelöscht (diff)
downloadpoolctrl-74cc50c86f3979303d7a062e53fd36486eb645f4.tar.gz
poolctrl-74cc50c86f3979303d7a062e53fd36486eb645f4.tar.xz
poolctrl-74cc50c86f3979303d7a062e53fd36486eb645f4.zip
GearmanController übergibt nun JSON
Diffstat (limited to 'application')
-rw-r--r--application/controllers/GearmanController.php71
1 files changed, 69 insertions, 2 deletions
diff --git a/application/controllers/GearmanController.php b/application/controllers/GearmanController.php
index b649684..562f7d4 100644
--- a/application/controllers/GearmanController.php
+++ b/application/controllers/GearmanController.php
@@ -17,7 +17,41 @@ class GearmanController extends Zend_Controller_Action
public function somepingAction()
{
- $ipString = '132.230.4.1; 132.230.4.2; 132.230.4.3; 132.230.4.4; 132.230.4.5; 132.230.4.6; 132.230.4.7; 132.230.4.8; 132.230.4.9; 132.230.4.10; 132.230.4.11; 132.230.4.12; 132.230.4.13; 132.230.4.14; 132.230.4.15; 132.230.4.16; 132.230.4.17; 132.230.4.18; 132.230.4.19; 132.230.4.20; 132.230.4.21; 132.230.4.22; 132.230.4.23; 132.230.4.24; 132.230.4.25; 132.230.4.26; 132.230.4.27; 132.230.4.28; 132.230.4.29; 132.230.4.30';
+ $ipArray = array(
+ '132.230.4.1',
+ '132.230.4.2',
+ '132.230.4.3',
+ '132.230.4.4',
+ '132.230.4.5',
+ '132.230.4.6',
+ '132.230.4.7',
+ '132.230.4.8',
+ '132.230.4.9',
+ '132.230.4.10',
+ '132.230.4.11',
+ '132.230.4.12',
+ '132.230.4.13',
+ '132.230.4.14',
+ '132.230.4.15',
+ '132.230.4.16',
+ '132.230.4.17',
+ '132.230.4.18',
+ '132.230.4.19',
+ '132.230.4.20',
+ '132.230.4.21',
+ '132.230.4.22',
+ '132.230.4.23',
+ '132.230.4.24',
+ '132.230.4.25',
+ '132.230.4.26',
+ '132.230.4.27',
+ '132.230.4.28',
+ '132.230.4.29',
+ '132.230.4.30',
+ );
+
+ $ipString = json_encode($ipArray);
+
$result = $this->gearmanClient->do("somePing", $ipString, 'somePing');
if (! $this->gearmanClient->runTasks())
{
@@ -38,7 +72,40 @@ class GearmanController extends Zend_Controller_Action
}
public function bootAction() {
- $ipString = '132.230.4.1; 132.230.4.2; 132.230.4.3; 132.230.4.4; 132.230.4.5; 132.230.4.6; 132.230.4.7; 132.230.4.8; 132.230.4.9; 132.230.4.10; 132.230.4.11; 132.230.4.12; 132.230.4.13; 132.230.4.14; 132.230.4.15; 132.230.4.16; 132.230.4.17; 132.230.4.18; 132.230.4.19; 132.230.4.20; 132.230.4.21; 132.230.4.22; 132.230.4.23; 132.230.4.24; 132.230.4.25; 132.230.4.26; 132.230.4.27; 132.230.4.28; 132.230.4.29; 132.230.4.30';
+ $clients = array(
+ array('ip' =>'132.230.4.1', 'mac' =>''),
+ array('ip' =>'132.230.4.2', 'mac' =>''),
+ array('ip' =>'132.230.4.3', 'mac' =>''),
+ array('ip' =>'132.230.4.4', 'mac' =>''),
+ array('ip' =>'132.230.4.5', 'mac' =>''),
+ array('ip' =>'132.230.4.6', 'mac' =>''),
+ array('ip' =>'132.230.4.7', 'mac' =>''),
+ array('ip' =>'132.230.4.8', 'mac' =>''),
+ array('ip' =>'132.230.4.9', 'mac' =>''),
+ array('ip' =>'132.230.4.10', 'mac' =>''),
+ array('ip' =>'132.230.4.11', 'mac' =>''),
+ array('ip' =>'132.230.4.12', 'mac' =>''),
+ array('ip' =>'132.230.4.13', 'mac' =>''),
+ array('ip' =>'132.230.4.14', 'mac' =>''),
+ array('ip' =>'132.230.4.15', 'mac' =>''),
+ array('ip' =>'132.230.4.16', 'mac' =>''),
+ array('ip' =>'132.230.4.17', 'mac' =>''),
+ array('ip' =>'132.230.4.18', 'mac' =>''),
+ array('ip' =>'132.230.4.19', 'mac' =>''),
+ array('ip' =>'132.230.4.20', 'mac' =>''),
+ array('ip' =>'132.230.4.21', 'mac' =>''),
+ array('ip' =>'132.230.4.22', 'mac' =>''),
+ array('ip' =>'132.230.4.23', 'mac' =>''),
+ array('ip' =>'132.230.4.24', 'mac' =>''),
+ array('ip' =>'132.230.4.25', 'mac' =>''),
+ array('ip' =>'132.230.4.26', 'mac' =>''),
+ array('ip' =>'132.230.4.27', 'mac' =>''),
+ array('ip' =>'132.230.4.28', 'mac' =>''),
+ array('ip' =>'132.230.4.29', 'mac' =>''),
+ array('ip' =>'132.230.4.30', 'mac' =>''),
+ );
+
+ $ipString = json_encode($clients);
$id = 1;
$result = $this->gearmanClient->do("boot", $ipString, 'boot' . $id);
if (! $this->gearmanClient->runTasks())