| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
GearmanClient::jobStatusgearman_job_status(PECL gearman >= 0.5.0) GearmanClient::jobStatus -- gearman_job_status — Get the status of a background job 説明オブジェクト指向型 (method):
public array GearmanClient::jobStatus
( string
$job_handle
)Gets the status for a background job given a job handle. The status information will specify whether the job is known, whether the job is currently running, and the percentage completion. パラメータ
返り値An array containing status information for the job corresponding to the supplied job handle. The first array element is a boolean indicating whether the job is even known, the second is a boolean indicating whether the job is still running, and the third and fourth elements correspond to the numerator and denominator of the fractional completion percentage, respectively. 例
例1 Monitor the status of a long running background job
<?php 上の例の出力は、 たとえば以下のようになります。 Running: true, numerator: 3, denomintor: 14 Running: true, numerator: 6, denomintor: 14 Running: true, numerator: 9, denomintor: 14 Running: true, numerator: 12, denomintor: 14 Running: false, numerator: 0, denomintor: 0 done! |
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「GearmanClient::jobStatus - Get the status of a background job」をGoogle検索
|