DatabaseAdapter
class DatabaseAdapter extends QueueAdapter (View source)
Constants
EXIT_SUCCESS |
|
EXIT_ERROR |
|
EXIT_MEMORY_LIMIT |
|
Properties
protected int | $start_time | Define the start time |
from QueueAdapter |
protected string | $queue | Determine the default watch name |
from QueueAdapter |
protected int | $tries | The number of working attempts |
from QueueAdapter |
protected int | $sleep | Define the sleep time |
from QueueAdapter |
Methods
configure(array $queue)
Configure Beanstalkd driver
void
int
size(string $queue = null)
Get the size of the queue.
void
run(string|null $queue = null)
Run the worker
void
flush(string|null $queue = null)
Flush the queue table
Details
QueueAdapter
configure(array $queue)
Configure Beanstalkd driver
void
push(ProducerService $producer)
Queue a job
string
serializeProducer(ProducerService $producer)
Create producer serialization
ProducerService
unserializeProducer(string $producer)
Create producer unserialize
void
sleep(int $seconds)
Sleep the process
final void
work(int $timeout, int $memory)
Laund the worker
never
kill(int $status = 0)
Kill the process.
protected bool
timeoutReached(int $timeout)
Determine if the timeout is reached
protected void
listenForSignals()
Enable async signals for the process.
protected bool
supportsAsyncSignals()
Determine if "async" signals are supported.
void
setTries(int $tries)
Set job tries
void
setSleep(int $sleep)
Set sleep time
string
getQueue(string|null $queue = null)
Get the queue or return the default.
string
generateId()
Generate the job id
int
size(string $queue = null)
Get the size of the queue.
void
run(string|null $queue = null)
Run the worker
void
flush(string|null $queue = null)
Flush the queue table
void
setQueue(string $queue)
Watch the queue name