作业正在运行,但在artisan schedule:列表中不可见



我最初安排了几个作业要运行,但后来从内核中删除了它们。然而,它们仍然在运行,并且它们没有显示在计划作业列表中!我知道它们正在运行,因为它们失败了,我在运行之前将作业的名称作为log::info记录在日志中。我快疯了。我用的是Laravel Vapor。我错过了什么?

正在运行的作业称为AutoSendFaxWithEncounter和AutoSendFaxWithReferral正在运行作业但不在调度程序中

Kernel.php


namespace AppConsole;
use IlluminateConsoleSchedulingSchedule;
use IlluminateSupportFacadesArtisan;
use IlluminateFoundationConsoleKernel as ConsoleKernel;
use DB;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
CommandsProcessFiles::class, 
CommandsImportCustomerFills::class, 
CommandsImportCustomerEncounters::class, 
CommandsImportCustomerReferrals::class, 
CommandsIndexFills::class, 
CommandsIndexEncounters::class,
CommandsIndexReferrals::class,  
CommandsCreateS3Directories::class,
CommandsFilterFills::class, 
CommandsInsertPatients::class, 
CommandsInsertPharmacies::class, 
CommandsInsertProviders::class, 
CommandsInsertProducts::class, 


];
/**
* Define the application's command schedule.
*
* @param  IlluminateConsoleSchedulingSchedule  $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{

$schedule->job(new AppJobsIncomingFaxage(3))
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsUpdateFaxageStatus(3))
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsStoreInboundS3())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsStoreOutboundS3())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsInsertProducts())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsInsertPatients())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsInsertProviders())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsInsertPharmacies())
->everyFiveMinutes()->environments(['production','local','staging']);
/*
$schedule->job(new AppJobsInsertClaims())
->everyFiveMinutes()->environments(['production','local','staging']);
*/

$schedule->job(new AppJobsInsertEncounterLocations())
->everyFiveMinutes()->environments(['production','local','staging']);
$schedule->job(new AppJobsIndexFills())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsIndexEncounters())
->everyFiveMinutes()->environments(['production','local','staging']);
$schedule->job(new AppJobsIndexReferrals())
->everyFiveMinutes()->environments(['production','local','staging']);
$schedule->job(new AppJobsIndexEncounterLocations())
->everyFiveMinutes()->environments(['production','local','staging']);

$schedule->job(new AppJobsFilterFills())
->everyFiveMinutes()->environments(['production','local','staging']);
$schedule->job(new AppJobsNpiRegistry())
->everyFiveMinutes()->environments(['production','local','staging']);
$schedule->job(new AppJobsRunImports())
->everyFiveMinutes()->environments(['production','local','staging']);

}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
artisan schedule:list
+---------+-------------+-----------------------------------+----------------------------+
| Command | Interval    | Description                       | Next Due                   |
+---------+-------------+-----------------------------------+----------------------------+
|         | */5 * * * * | AppJobsIncomingFaxage           | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsUpdateFaxageStatus       | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsStoreInboundS3           | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsStoreOutboundS3          | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsInsertProducts           | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsInsertPatients           | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsInsertProviders          | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsInsertPharmacies         | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsInsertEncounterLocations | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsIndexFills               | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsIndexEncounters          | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsIndexReferrals           | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsIndexEncounterLocations  | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsFilterFills              | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsNpiRegistry              | 2021-07-28 15:35:00 +00:00 |
|         | */5 * * * * | AppJobsRunImports               | 2021-07-28 15:35:00 +00:00 |
+---------+-------------+-----------------------------------+----------------------------+

我自己解决了这个问题。这是骗人的,并且在蒸汽文档中没有很好的记录。我的问题是我的部署yaml文件和在生产和阶段项目环境之间使用相同的自定义队列名称。我看到的是在另一个环境中运行的作业,但是在同一个队列中。

嘿,你需要检查蒸气UI。

新的开源包:Vapor UI。简而言之,这个包在蒸汽驱动的应用程序中提供了一个漂亮的仪表板,允许您监视应用程序的日志和失败的队列作业。

在这里您可以查看所有与作业和调度相关的内容。

composer require laravel/vapor-ui

php artisan vapor-ui:install

更多信息请查看下面的网址

https://docs.vapor.build/1.0/introduction.html installing-the-vapor-ui-dashboard

最新更新