Mojo::WebSocketProxy::Backend::JobAsync
A subclass of Mojo::WebSocketProxy::Backend which dispatches RPC requests via Job::Async.
A duration of timeout in seconds (default: 300) for receiving response from RPC queue. The default value can be orverriden by setting an environment variable of the same name:
$ENV{QUEUE_TIMEOUT} = 2;
Returns a new instance. Required params:
-
loop => IO::Async::Loop
Containing IO::Async::Loop instance.
-
jobman => Job::Async
Optional Job::Async instance. If non-empty, it should be already added to the
loop
. -
client => Job::Async::Client
Optional Job::Async::Client instance. If non-empty, it should be constructed by
$jobman->client
. Will be constructed from$jobman->client
if not provided.
$client = $backend->client
Returns the Job::Async::Client instance.
$client = $backend->loop
Returns the async IO loop object.
$jobman = $backend->jobman
Returns an object of Job::Async that acts as job manager for the queue client.
Implements the "call_rpc" in Mojo::WebSocketProxy::Backend interface.
Mojolicious::Plugin::WebSocketProxy, Mojo::WebSocketProxy Mojo::WebSocketProxy::Backend, Mojo::WebSocketProxy::Dispatcher, Mojo::WebSocketProxy::Config Mojo::WebSocketProxy::Parser
Copyright (C) 2022 Deriv Group Services Ltd