Sha256: 9f33571de1203e9862f0869e9098bd381e782a76e7957f67a72c6268afb29520

Contents?: true

Size: 419 Bytes

Versions: 12

Compression:

Stored size: 419 Bytes

Contents

<?php

require_once 'Net/Gearman/Client.php';

$set = new Net_Gearman_Set();

function result($func, $handle, $result) {
    var_dump($func);
    var_dump($handle);
    var_dump($result);
}

$task = new Net_Gearman_Task('Sleep', array(
  'seconds' => 20
));

$task->attachCallback('result');
$set->addTask($task);

$client = new Net_Gearman_Client(array('localhost:4730', 'localhost:4731'));
$client->runSet($set);

?>

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
gearman-ruby-3.0.8 examples/client.php
xing-gearman-ruby-1.0.0 examples/client.php
xing-gearman-ruby-1.1.0 examples/client.php
xing-gearman-ruby-1.2.0 examples/client.php
xing-gearman-ruby-1.3.0 examples/client.php
xing-gearman-ruby-1.3.1 examples/client.php
gearman-ruby-3.0.7 examples/client.php
gearman-ruby-3.0.6 examples/client.php
gearman-ruby-3.0.4 examples/client.php
gearman-ruby-3.0.3 examples/client.php
gearman-ruby-3.0.2 examples/client.php
gearman-ruby-3.0.1 examples/client.php