本文整理匯總了PHP中Illuminate\Contracts\Queue\Job::getName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Job::getName方法的具體用法?PHP Job::getName怎麽用?PHP Job::getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Contracts\Queue\Job
的用法示例。
在下文中一共展示了Job::getName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fire
public function fire(Job $job, $data)
{
$this->codex->log('alert', 'codex.hooks.git.sync.project.command', ['jobName' => $job->getName(), 'jobAttempts' => $job->attempts(), 'project' => $data['project']]);
if ($job->attempts() > 2) {
$job->delete();
}
$this->codex->getProject($data['project'])->gitSyncer()->syncAll();
}
示例2: writeOutput
/**
* Write the status output for the queue worker.
*
* @param \Illuminate\Contracts\Queue\Job $job
* @param bool $failed
* @return void
*/
protected function writeOutput(Job $job, $failed)
{
if ($failed) {
$this->output->writeln('<error>Failed:</error> ' . $job->getName());
} else {
$this->output->writeln('<info>Processed:</info> ' . $job->getName());
}
}
示例3: writeOutput
/**
* Write the status output for the queue worker.
*
* @param \Illuminate\Contracts\Queue\Job $job
* @param bool $failed
* @return void
*/
protected function writeOutput(Job $job, $failed)
{
if ($failed) {
$this->output->writeln('<error>[' . Carbon::now()->format('Y-m-d H:i:s') . '] Failed:</error> ' . $job->getName());
} else {
$this->output->writeln('<info>[' . Carbon::now()->format('Y-m-d H:i:s') . '] Processed:</info> ' . $job->getName());
}
}