Durable Workflow PHP SDK — API Reference

Guides

PollResponse
in package

FinalYes

Classifies full worker poll response envelopes using protocol fields.

Table of Contents

Constants

TERMINAL_POLL_STATUSES  : array<int, string> = ['stale_worker_registration', 'draining', 'stop...
TERMINAL_REASONS  : array<int, string> = ['stale_worker_registration', 'worker_heartbeat...

Methods

isTerminal()  : bool
isTransientFailure()  : bool
Identify transport failures that the worker protocol explicitly permits a managed worker to retry. Generic service failures are intentionally excluded even when they use the same HTTP status.
__construct()  : mixed

Constants

TERMINAL_POLL_STATUSES

public array<int, string> TERMINAL_POLL_STATUSES = ['stale_worker_registration', 'draining', 'stopped']

TERMINAL_REASONS

public array<int, string> TERMINAL_REASONS = ['stale_worker_registration', 'worker_heartbeat_stale', 'worker_draining', 'worker_stopped']

Methods

isTerminal()

public static isTerminal(array<string, mixed> $response) : bool
Parameters
$response : array<string, mixed>
Return values
bool

isTransientFailure()

Identify transport failures that the worker protocol explicitly permits a managed worker to retry. Generic service failures are intentionally excluded even when they use the same HTTP status.

public static isTransientFailure(ServerException $exception) : bool
Parameters
$exception : ServerException
Return values
bool
On this page

Search results