tamerlib/tests/gearman_closure.php

15 lines
347 B
PHP
Raw Normal View History

2023-02-01 23:42:41 -05:00
<?php
require 'ncc';
use Tamer\Objects\JobResults;
use Tamer\Objects\Task;
import('net.nosial.tamerlib', 'latest');
$client = new \Tamer\Protocols\GearmanClient();
$client->addServer();
$client->closure(function () {
echo "This function was sent from a client, it should be executed on the worker";
});