ProducerService
abstract class ProducerService (View source)
Traits
Properties
protected string | $queue | Define the queue |
|
protected int | $delay | Define the delay |
|
protected int | $retry | Define the time of retry |
|
protected int | $priority | Define the priority |
|
protected bool | $delete | Determine if the job can be deleted |
|
protected string|null | $id | Define the job id |
|
protected int | $attemps | Define the job attempts |
Methods
ProducerService constructor
Get the producer priority
Get the producer id
Get the producer attemps
Get the producer retry
Get the producer queue
Get the producer delay
Set the producer attemps
Set the producer retry
Set the producer queue
Set the producer delay
Delete the job from queue.
Delete the job from queue.
Process the producer
Details
array
__serialize()
Prepare the instance values for serialization.
void
__unserialize(array $values)
Restore the model after serialization.
protected mixed
getPropertyValue(ReflectionProperty $property)
Get the property value for the given property.
mixed
__construct()
ProducerService constructor
final int
getPriority()
Get the producer priority
string
getId()
Get the producer id
int
getAttemps()
Get the producer attemps
final int
getRetry()
Get the producer retry
final string
getQueue()
Get the producer queue
final int
getDelay()
Get the producer delay
void
setAttemps(int $attemps)
Set the producer attemps
final void
setRetry(int $retry)
Set the producer retry
final void
setQueue(string $queue)
Set the producer queue
final
setDelay(int $delay)
Set the producer delay
void
deleteJob()
Delete the job from queue.
bool
jobShouldBeDelete()
Delete the job from queue.
void
onException(Throwable $e)
Get the job error
abstract void
process()
Process the producer