386 lines
7.8 KiB
YAML
386 lines
7.8 KiB
YAML
|
name: DatabaseQueue
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: ClearableQueue
|
||
|
type: class
|
||
|
source: Illuminate\Contracts\Queue\ClearableQueue
|
||
|
- name: QueueContract
|
||
|
type: class
|
||
|
source: Illuminate\Contracts\Queue\Queue
|
||
|
- name: Connection
|
||
|
type: class
|
||
|
source: Illuminate\Database\Connection
|
||
|
- name: DatabaseJob
|
||
|
type: class
|
||
|
source: Illuminate\Queue\Jobs\DatabaseJob
|
||
|
- name: DatabaseJobRecord
|
||
|
type: class
|
||
|
source: Illuminate\Queue\Jobs\DatabaseJobRecord
|
||
|
- name: Carbon
|
||
|
type: class
|
||
|
source: Illuminate\Support\Carbon
|
||
|
- name: Str
|
||
|
type: class
|
||
|
source: Illuminate\Support\Str
|
||
|
- name: PDO
|
||
|
type: class
|
||
|
source: PDO
|
||
|
properties:
|
||
|
- name: database
|
||
|
visibility: protected
|
||
|
comment: '# * The database connection instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Database\Connection'
|
||
|
- name: table
|
||
|
visibility: protected
|
||
|
comment: '# * The database table that holds the jobs.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: default
|
||
|
visibility: protected
|
||
|
comment: '# * The name of the default queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: retryAfter
|
||
|
visibility: protected
|
||
|
comment: '# * The expiration time of a job.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var int|null'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: database
|
||
|
- name: table
|
||
|
- name: default
|
||
|
default: '''default'''
|
||
|
- name: retryAfter
|
||
|
default: '60'
|
||
|
- name: dispatchAfterCommit
|
||
|
default: 'false'
|
||
|
comment: "# * The database connection instance.\n# *\n# * @var \\Illuminate\\Database\\\
|
||
|
Connection\n# */\n# protected $database;\n# \n# /**\n# * The database table that\
|
||
|
\ holds the jobs.\n# *\n# * @var string\n# */\n# protected $table;\n# \n# /**\n\
|
||
|
# * The name of the default queue.\n# *\n# * @var string\n# */\n# protected $default;\n\
|
||
|
# \n# /**\n# * The expiration time of a job.\n# *\n# * @var int|null\n# */\n#\
|
||
|
\ protected $retryAfter = 60;\n# \n# /**\n# * Create a new database queue instance.\n\
|
||
|
# *\n# * @param \\Illuminate\\Database\\Connection $database\n# * @param string\
|
||
|
\ $table\n# * @param string $default\n# * @param int $retryAfter\n# * @param\
|
||
|
\ bool $dispatchAfterCommit\n# * @return void"
|
||
|
- name: size
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
comment: '# * Get the size of the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return int'
|
||
|
- name: push
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: job
|
||
|
- name: data
|
||
|
default: ''''''
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
comment: '# * Push a new job onto the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $job
|
||
|
|
||
|
# * @param mixed $data
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: pushRaw
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: payload
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
- name: options
|
||
|
default: '[]'
|
||
|
comment: '# * Push a raw payload onto the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $payload
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @param array $options
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: later
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: delay
|
||
|
- name: job
|
||
|
- name: data
|
||
|
default: ''''''
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
comment: '# * Push a new job onto the queue after (n) seconds.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \DateTimeInterface|\DateInterval|int $delay
|
||
|
|
||
|
# * @param string $job
|
||
|
|
||
|
# * @param mixed $data
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: bulk
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: jobs
|
||
|
- name: data
|
||
|
default: ''''''
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
comment: '# * Push an array of jobs onto the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $jobs
|
||
|
|
||
|
# * @param mixed $data
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: release
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: job
|
||
|
- name: delay
|
||
|
comment: '# * Release a reserved job back onto the queue after (n) seconds.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $queue
|
||
|
|
||
|
# * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job
|
||
|
|
||
|
# * @param int $delay
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: pushToDatabase
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: payload
|
||
|
- name: delay
|
||
|
default: '0'
|
||
|
- name: attempts
|
||
|
default: '0'
|
||
|
comment: '# * Push a raw payload to the database with a given delay of (n) seconds.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @param string $payload
|
||
|
|
||
|
# * @param \DateTimeInterface|\DateInterval|int $delay
|
||
|
|
||
|
# * @param int $attempts
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: buildDatabaseRecord
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: payload
|
||
|
- name: availableAt
|
||
|
- name: attempts
|
||
|
default: '0'
|
||
|
comment: '# * Create an array to insert for the given job.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @param string $payload
|
||
|
|
||
|
# * @param int $availableAt
|
||
|
|
||
|
# * @param int $attempts
|
||
|
|
||
|
# * @return array'
|
||
|
- name: pop
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
default: 'null'
|
||
|
comment: '# * Pop the next job off of the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return \Illuminate\Contracts\Queue\Job|null
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @throws \Throwable'
|
||
|
- name: getNextAvailableJob
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
comment: '# * Get the next available job for the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return \Illuminate\Queue\Jobs\DatabaseJobRecord|null'
|
||
|
- name: getLockForPopping
|
||
|
visibility: protected
|
||
|
parameters: []
|
||
|
comment: '# * Get the lock required for popping the next job.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return string|bool'
|
||
|
- name: isAvailable
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: query
|
||
|
comment: '# * Modify the query to check for available jobs.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Database\Query\Builder $query
|
||
|
|
||
|
# * @return void'
|
||
|
- name: isReservedButExpired
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: query
|
||
|
comment: '# * Modify the query to check for jobs that are reserved but have expired.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Database\Query\Builder $query
|
||
|
|
||
|
# * @return void'
|
||
|
- name: marshalJob
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: job
|
||
|
comment: '# * Marshal the reserved job into a DatabaseJob instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $queue
|
||
|
|
||
|
# * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job
|
||
|
|
||
|
# * @return \Illuminate\Queue\Jobs\DatabaseJob'
|
||
|
- name: markJobAsReserved
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: job
|
||
|
comment: '# * Mark the given job ID as reserved.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Queue\Jobs\DatabaseJobRecord $job
|
||
|
|
||
|
# * @return \Illuminate\Queue\Jobs\DatabaseJobRecord'
|
||
|
- name: deleteReserved
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: id
|
||
|
comment: '# * Delete a reserved job from the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $queue
|
||
|
|
||
|
# * @param string $id
|
||
|
|
||
|
# * @return void
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @throws \Throwable'
|
||
|
- name: deleteAndRelease
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
- name: job
|
||
|
- name: delay
|
||
|
comment: '# * Delete a reserved job from the reserved queue and release it.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $queue
|
||
|
|
||
|
# * @param \Illuminate\Queue\Jobs\DatabaseJob $job
|
||
|
|
||
|
# * @param int $delay
|
||
|
|
||
|
# * @return void'
|
||
|
- name: clear
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
comment: '# * Delete all of the jobs from the queue.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $queue
|
||
|
|
||
|
# * @return int'
|
||
|
- name: getQueue
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: queue
|
||
|
comment: '# * Get the queue or return the default.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $queue
|
||
|
|
||
|
# * @return string'
|
||
|
- name: getDatabase
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Get the underlying database instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return \Illuminate\Database\Connection'
|
||
|
traits:
|
||
|
- Illuminate\Contracts\Queue\ClearableQueue
|
||
|
- Illuminate\Database\Connection
|
||
|
- Illuminate\Queue\Jobs\DatabaseJob
|
||
|
- Illuminate\Queue\Jobs\DatabaseJobRecord
|
||
|
- Illuminate\Support\Carbon
|
||
|
- Illuminate\Support\Str
|
||
|
- PDO
|
||
|
interfaces:
|
||
|
- QueueContract
|