| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
GearmanClient::doNormal(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう) GearmanClient::doNormal — Run a single task and return a result 説明
public string GearmanClient::doNormal
( string
$function_name
, string $workload
[, string $unique
] )Runs a single task and returns a string representation of the result. It is up to the GearmanClient and GearmanWorker to agree on the format of the result. パラメータ
返り値A string representing the results of running a task. 例
例1 Simple job submission with immediate return
<?php
<?php
<?php 上の例の出力は、 たとえば以下のようになります。 Starting Sending job Success: !olleH 例2 Submitting a job and retrieving incremental status A job is submitted and the script loops to retrieve status information. The worker has an artificial delay which results in a long running job and sends status and data as processing occurs. Each subsequent call to GearmanClient::doNormal() produces status information on the running job.
<?php
<?php 上の例の出力は、 たとえば以下のようになります。 Worker output: Starting Waiting for job... Received job: H:foo.local:106 Workload: Hello! (6) 1/6 complete 2/6 complete 3/6 complete 4/6 complete 5/6 complete 6/6 complete Result: !olleH Client output: Starting Sending job Status: 1/6 complete Data: H Status: 2/6 complete Data: e Status: 3/6 complete Data: l Status: 4/6 complete Data: l Status: 5/6 complete Data: o Status: 6/6 complete Data: ! Success: !olleH 参考
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「GearmanClient::doNormal - Run a single task and return a result」をGoogle検索
|