api/laravel/Queue/Console/WorkCommand.yaml

217 lines
6 KiB
YAML
Raw Normal View History

2024-09-26 09:03:21 +00:00
name: WorkCommand
class_comment: null
dependencies:
- name: Command
type: class
source: Illuminate\Console\Command
- name: Cache
type: class
source: Illuminate\Contracts\Cache\Repository
- name: Job
type: class
source: Illuminate\Contracts\Queue\Job
- name: JobFailed
type: class
source: Illuminate\Queue\Events\JobFailed
- name: JobProcessed
type: class
source: Illuminate\Queue\Events\JobProcessed
- name: JobProcessing
type: class
source: Illuminate\Queue\Events\JobProcessing
- name: JobReleasedAfterException
type: class
source: Illuminate\Queue\Events\JobReleasedAfterException
- name: Worker
type: class
source: Illuminate\Queue\Worker
- name: WorkerOptions
type: class
source: Illuminate\Queue\WorkerOptions
- name: Carbon
type: class
source: Illuminate\Support\Carbon
- name: InteractsWithTime
type: class
source: Illuminate\Support\InteractsWithTime
- name: AsCommand
type: class
source: Symfony\Component\Console\Attribute\AsCommand
- name: Terminal
type: class
source: Symfony\Component\Console\Terminal
- name: InteractsWithTime
type: class
source: InteractsWithTime
properties:
- name: signature
visibility: protected
comment: '# * The console command name.
# *
# * @var string'
- name: description
visibility: protected
comment: '# * The console command description.
# *
# * @var string'
- name: worker
visibility: protected
comment: '# * The queue worker instance.
# *
# * @var \Illuminate\Queue\Worker'
- name: cache
visibility: protected
comment: '# * The cache store implementation.
# *
# * @var \Illuminate\Contracts\Cache\Repository'
- name: latestStartedAt
visibility: protected
comment: '# * Holds the start time of the last processed job, if any.
# *
# * @var float|null'
methods:
- name: __construct
visibility: public
parameters:
- name: worker
- name: cache
comment: "# * The console command name.\n# *\n# * @var string\n# */\n# protected\
\ $signature = 'queue:work\n# {connection? : The name of the queue connection\
\ to work}\n# {--name=default : The name of the worker}\n# {--queue= : The names\
\ of the queues to work}\n# {--daemon : Run the worker in daemon mode (Deprecated)}\n\
# {--once : Only process the next job on the queue}\n# {--stop-when-empty : Stop\
\ when the queue is empty}\n# {--delay=0 : The number of seconds to delay failed\
\ jobs (Deprecated)}\n# {--backoff=0 : The number of seconds to wait before retrying\
\ a job that encountered an uncaught exception}\n# {--max-jobs=0 : The number\
\ of jobs to process before stopping}\n# {--max-time=0 : The maximum number of\
\ seconds the worker should run}\n# {--force : Force the worker to run even in\
\ maintenance mode}\n# {--memory=128 : The memory limit in megabytes}\n# {--sleep=3\
\ : Number of seconds to sleep when no job is available}\n# {--rest=0 : Number\
\ of seconds to rest between jobs}\n# {--timeout=60 : The number of seconds a\
\ child process can run}\n# {--tries=1 : Number of times to attempt a job before\
\ logging it failed}';\n# \n# /**\n# * The console command description.\n# *\n\
# * @var string\n# */\n# protected $description = 'Start processing jobs on the\
\ queue as a daemon';\n# \n# /**\n# * The queue worker instance.\n# *\n# * @var\
\ \\Illuminate\\Queue\\Worker\n# */\n# protected $worker;\n# \n# /**\n# * The\
\ cache store implementation.\n# *\n# * @var \\Illuminate\\Contracts\\Cache\\\
Repository\n# */\n# protected $cache;\n# \n# /**\n# * Holds the start time of\
\ the last processed job, if any.\n# *\n# * @var float|null\n# */\n# protected\
\ $latestStartedAt;\n# \n# /**\n# * Create a new queue work command.\n# *\n# *\
\ @param \\Illuminate\\Queue\\Worker $worker\n# * @param \\Illuminate\\Contracts\\\
Cache\\Repository $cache\n# * @return void"
- name: handle
visibility: public
parameters: []
comment: '# * Execute the console command.
# *
# * @return int|null'
- name: runWorker
visibility: protected
parameters:
- name: connection
- name: queue
comment: '# * Run the worker instance.
# *
# * @param string $connection
# * @param string $queue
# * @return int|null'
- name: gatherWorkerOptions
visibility: protected
parameters: []
comment: '# * Gather all of the queue worker options as a single object.
# *
# * @return \Illuminate\Queue\WorkerOptions'
- name: listenForEvents
visibility: protected
parameters: []
comment: '# * Listen for the queue events in order to update the console output.
# *
# * @return void'
- name: writeOutput
visibility: protected
parameters:
- name: job
- name: status
comment: '# * Write the status output for the queue worker.
# *
# * @param \Illuminate\Contracts\Queue\Job $job
# * @param string $status
# * @return void'
- name: now
visibility: protected
parameters: []
comment: '# * Get the current date / time.
# *
# * @return \Illuminate\Support\Carbon'
- name: logFailedJob
visibility: protected
parameters:
- name: event
comment: '# * Store a failed job event.
# *
# * @param \Illuminate\Queue\Events\JobFailed $event
# * @return void'
- name: getQueue
visibility: protected
parameters:
- name: connection
comment: '# * Get the queue name for the worker.
# *
# * @param string $connection
# * @return string'
- name: downForMaintenance
visibility: protected
parameters: []
comment: '# * Determine if the worker should run in maintenance mode.
# *
# * @return bool'
traits:
- Illuminate\Console\Command
- Illuminate\Contracts\Queue\Job
- Illuminate\Queue\Events\JobFailed
- Illuminate\Queue\Events\JobProcessed
- Illuminate\Queue\Events\JobProcessing
- Illuminate\Queue\Events\JobReleasedAfterException
- Illuminate\Queue\Worker
- Illuminate\Queue\WorkerOptions
- Illuminate\Support\Carbon
- Illuminate\Support\InteractsWithTime
- Symfony\Component\Console\Attribute\AsCommand
- Symfony\Component\Console\Terminal
- InteractsWithTime
interfaces: []