WorkerSession
in package
FinalYes
Typed create/use/renew/close handle for one worker-held session lease.
Table of Contents
Properties
- $options : WorkerSessionOptions
- $workerId : string
- $client : Client
- $closed : bool
- $closeResponse : array<string, mixed>|null
Methods
- __construct() : mixed
- activityOptions() : array<string, mixed>
- close() : array<string, mixed>
- create() : array<string, mixed>
- rebuildRequiredAfterHolderLoss() : bool
- renew() : array<string, mixed>
Properties
$options read-only
public
WorkerSessionOptions
$options
$workerId read-only
public
string
$workerId
$client read-only
private
Client
$client
$closed
private
bool
$closed
= false
$closeResponse
private
array<string, mixed>|null
$closeResponse
= null
Methods
__construct()
public
__construct(Client $client, string $workerId, WorkerSessionOptions $options) : mixed
Parameters
- $client : Client
- $workerId : string
- $options : WorkerSessionOptions
activityOptions()
public
activityOptions() : array<string, mixed>
Return values
array<string, mixed>close()
public
close([string $reason = 'worker_shutdown' ]) : array<string, mixed>
Parameters
- $reason : string = 'worker_shutdown'
Return values
array<string, mixed>create()
public
create() : array<string, mixed>
Return values
array<string, mixed>rebuildRequiredAfterHolderLoss()
public
rebuildRequiredAfterHolderLoss() : bool
Return values
boolrenew()
public
renew([int|null $leaseSeconds = null ]) : array<string, mixed>
Parameters
- $leaseSeconds : int|null = null