KMP PHP API Reference

PlatformWorkerRunCommand extends Command
in package

Runs one bounded platform schedule and queue worker cycle.

Table of Contents

Constants

ADVISORY_LOCK_KEY  : mixed = 'kmp:platform-worker'

Properties

$platformConnection  : Connection|null
$workerService  : PlatformWorkerService|null

Methods

__construct()  : mixed
defaultName()  : string
execute()  : int
buildOptionParser()  : ConsoleOptionParser
acquireWorkerLock()  : bool
Acquire the process-wide worker lock when PostgreSQL is available.
failureCount()  : int
releaseWorkerLock()  : void
Release the process-wide worker lock when PostgreSQL is available.

Constants

Properties

Methods

execute()

public execute(Arguments $args, ConsoleIo $io) : int
Parameters
$args : Arguments
$io : ConsoleIo
Tags
inheritDoc
Return values
int

buildOptionParser()

protected buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
$parser : ConsoleOptionParser
Tags
inheritDoc
Return values
ConsoleOptionParser

acquireWorkerLock()

Acquire the process-wide worker lock when PostgreSQL is available.

private acquireWorkerLock(Connection $connection) : bool
Parameters
$connection : Connection
Return values
bool

failureCount()

private failureCount(array<string, mixed> $result) : int
Parameters
$result : array<string, mixed>

Worker result

Return values
int

releaseWorkerLock()

Release the process-wide worker lock when PostgreSQL is available.

private releaseWorkerLock(Connection $connection) : void
Parameters
$connection : Connection
On this page

Search results