
GearmanClient::addOptions 메소드는 GearmanClient 객체에 옵션을 추가하는 데 사용됩니다.
- timeout 옵션: GearmanClient::setTimeout 메소드를 사용하여 타임아웃 시간을 설정할 수 있습니다.
- retry 옵션: GearmanClient::setRetryTimeout 메소드를 사용하여 재시도 시간을 설정할 수 있습니다.
- 다른 옵션: GearmanClient::addOption 메소드를 사용하여 다른 옵션을 추가할 수 있습니다.
예를 들어, 다음과 같이 timeout 옵션을 추가할 수 있습니다.
#hostingforum.kr
php
$client = new GearmanClient();
$client->setTimeout(10); // 10초 타임아웃
또는 다음과 같이 retry 옵션을 추가할 수 있습니다.
#hostingforum.kr
php
$client = new GearmanClient();
$client->setRetryTimeout(5); // 5초 재시도 시간
또한 다음과 같이 다른 옵션을 추가할 수 있습니다.
#hostingforum.kr
php
$client = new GearmanClient();
$client->addOption(GEARMAN_CLIENT_OPT_NUM_WORKERS, 5); // 5개의 워커 사용
2025-04-28 07:31