PHPDaemon\Examples\ExampleComplexJob::foo PHP Method

foo() final public method

final public foo ( $arg )
    public final function foo($arg)
    {
        return function ($jobname, $job) use($arg) {
            \PHPDaemon\Core\Timer::add(function ($event) use($jobname, $job, $arg) {
                // Job done
                $job->setResult($jobname, ['job' => 'foo', 'success' => true, 'line' => __LINE__, 'arg' => $arg]);
                $event->finish();
            }, 1000.0 * 100);
        };
    }
ExampleComplexJob