在 Laravel 6 中,在队列执行过程中,每一个任务的执行,皆会执行 View::addLocation($location);,然而每一个任务皆只会取第 1 个任务的 $location
2、参考:在 Laravel 6 中,在服务容器中绑定一个单例后,如何在解析时重新设置单例的构造方法的参数?
3、发现报错的根源在于,在队列执行过程中,每一个任务的执行,皆会执行 View::addLocation($location);,然而皆会取第 1 个 $location,而此时第 1 个 $location 所对应的目录已经被删除了。期望能够取到本次任务的 $location。
4、打印日志实现,发现在每一个任务中,单例的构造方法的参数 是在变化的。单例中的属性也是在变化的。
public function __construct(string $defaultMigrationsLocation)
{
Log::info(
'$defaultMigrationsLocation',
[$defaultMigrationsLocation]
);
$this->location = $defaultMigrationsLocation;
Log::info(
'$this->location',
[$this->location]
);
View::addLocation($this->location);
}
[2023-07-19 17:38:59] local.INFO: $parameters {
"migrationsLocation": "E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759452.2556.1081754280/migrations"
}
[2023-07-19 17:38:59] local.INFO: $defaultMigrationsLocation [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759452.2556.1081754280/migrations"
]
[2023-07-19 17:38:59] local.INFO: $this->location [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759452.2556.1081754280/migrations"
]
[2023-07-19 17:42:15] local.INFO: $parameters {
"migrationsLocation": "E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759545.3404.1736703749/migrations"
}
[2023-07-19 17:42:15] local.INFO: $defaultMigrationsLocation [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759545.3404.1736703749/migrations"
]
[2023-07-19 17:42:15] local.INFO: $this->location [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759545.3404.1736703749/migrations"
]
[2023-07-19 17:42:18] local.INFO: $parameters {
"migrationsLocation": "E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759640.9956.389729755/migrations"
}
[2023-07-19 17:42:18] local.INFO: $defaultMigrationsLocation [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759640.9956.389729755/migrations"
]
[2023-07-19 17:42:18] local.INFO: $this->location [
"E:\\wwwroot\\xxx\\storage\\app/theme_downloads/2023/07/19/1689759640.9956.389729755/migrations"
]
[2023-07-19 17:42:25] local.ERROR: filemtime(): stat failed for E:\wwwroot\object\storage\app\theme_downloads\2023\07\19\1689759452.2556.1081754280\migrations/migrate_cart.blade.php {
"exception": "[object] (ErrorException(code: 0): filemtime(): stat failed for E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\19\\1689759452.2556.1081754280\\migrations/migrate_cart.blade.php at E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php:356)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'filemtime(): st...', 'E:\\\\wwwroot\\\\wsho...', 356, Array)
#1 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php(356): filemtime('E:\\\\wwwroot\\\\wsho...')
#2 E:\\wwwroot\\xxx\\Modules\\Theme\\View\\FileViewStorage.php(40): Illuminate\\Filesystem\\Filesystem->lastModified('E:\\\\wwwroot\\\\wsho...')
#3 E:\\wwwroot\\xxx\\Modules\\View\\Compiler\\BladeCompiler.php(31): Modules\\Theme\\View\\FileViewStorage->lastModified('E:\\\\wwwroot\\\\wsho...')
#4 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Engines\\CompilerEngine.php(50): Modules\\View\\Compiler\\BladeCompiler->isExpired('E:\\\\wwwroot\\\\wsho...')
#5 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(143): Illuminate\\View\\Engines\\CompilerEngine->get('E:\\\\wwwroot\\\\wsho...', Array)
#6 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(126): Illuminate\\View\\View->getContents()
#7 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\View\\View.php(91): Illuminate\\View\\View->renderContents()
#8 E:\\wwwroot\\xxx\\Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator.php(324): Illuminate\\View\\View->render()
#9 E:\\wwwroot\\xxx\\Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator.php(185): Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator->migrateBladeTemplate('migrate_cart', Object(Modules\\ThemeStoreDb\\Models\\ThemeInstallationTask))
#10 E:\\wwwroot\\xxx\\Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator.php(61): Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator->migrateTemplate(Object(Modules\\ThemeStoreDb\\Models\\ThemeInstallation), Object(Modules\\ThemeStoreDb\\Models\\ThemeInstallationTask), Array)
#11 E:\\wwwroot\\xxx\\Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings.php(148): Modules\\ThemeStoreDb\\ThemeSetting\\ThemeSettingMigrator->migrateThemeSettings(Object(Modules\\ThemeStoreDb\\Models\\ThemeInstallation), Object(Modules\\ThemeStoreDb\\Models\\ThemeInstallationTask))
#12 E:\\wwwroot\\xxx\\Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings.php(72): Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings->migrateThemeSettings()
#13 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(36): Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings->handle()
#14 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(37): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#16 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#17 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#18 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Bus\\Dispatcher.php(94): Illuminate\\Container\\Container->call(Array)
#19 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(130): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings))
#20 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings))
#21 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Bus\\Dispatcher.php(98): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#22 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\CallQueuedHandler.php(83): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings), false)
#23 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(130): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings))
#24 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings))
#25 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\CallQueuedHandler.php(85): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#26 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\CallQueuedHandler.php(59): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Modules\\ThemeStoreDb\\Jobs\\MigrateThemeSettings))
#27 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Jobs\\Job.php(88): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)
#28 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(368): Illuminate\\Queue\\Jobs\\Job->fire()
#29 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(314): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Queue\\WorkerOptions))
#30 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Worker.php(134): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\RedisJob), 'redis', Object(Illuminate\\Queue\\WorkerOptions))
#31 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Console\\WorkCommand.php(112): Illuminate\\Queue\\Worker->daemon('redis', 'default', Object(Illuminate\\Queue\\WorkerOptions))
#32 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Queue\\Console\\WorkCommand.php(96): Illuminate\\Queue\\Console\\WorkCommand->runWorker('redis', 'default')
#33 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#34 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(37): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#35 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#36 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#37 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(590): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#38 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(134): Illuminate\\Container\\Container->call(Array)
#39 E:\\wwwroot\\xxx\\vendor\\symfony\\console\\Command\\Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#40 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(121): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#41 E:\\wwwroot\\xxx\\vendor\\symfony\\console\\Application.php(1009): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#42 E:\\wwwroot\\xxx\\vendor\\symfony\\console\\Application.php(273): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#43 E:\\wwwroot\\xxx\\vendor\\symfony\\console\\Application.php(149): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#44 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(93): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#45 E:\\wwwroot\\xxx\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(131): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#46 E:\\wwwroot\\xxx\\artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#47 {main}
"
}
5、继续打印更为详细的日志,编辑 /vendor/laravel/framework/src/Illuminate/View/Factory.php
public function make($view, $data = [], $mergeData = [])
{
$path = $this->finder->find(
$view = $this->normalizeName($view)
);
Log::info(
'$path',
[$path]
);
// Next, we will create the view instance and call the view creator for the view
// which can set any data, etc. Then we will return the view instance back to
// the caller for rendering or performing other view manipulations on this.
$data = array_merge($mergeData, $this->parseData($data));
return tap($this->viewInstance($view, $path, $data), function ($view) {
$this->callCreator($view);
});
}
6、继续打印更为详细的日志,编辑 /vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php
public function find($name)
{
Log::info(
'$this->views',
[$this->views]
);
if (isset($this->views[$name])) {
return $this->views[$name];
}
if ($this->hasHintInformation($name = trim($name))) {
return $this->views[$name] = $this->findNamespacedView($name);
}
Log::info(
'$this->paths',
[$this->paths]
);
return $this->views[$name] = $this->findInPaths($name, $this->paths);
}
7、查看打印出的日志信息,得出结论,在最后一次打印的 $this->views 中,仅存在第 1 个任务中的视图文件,即一个视图文件的名称所对应的文件路径已经被缓存在对象属性 $this->views 中。所以才会导致第 2 个任务继续使用第 1 个任务中的视图文件路径,由于第 1 个任务中的视图文件已经被删除,进而导致报错。
[2023-07-21 16:54:54] local.INFO: $this->views [
[]
]
[2023-07-21 16:54:54] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:54] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php"
]
[2023-07-21 16:54:54] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php"
}
]
[2023-07-21 16:54:54] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:54] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php"
]
[2023-07-21 16:54:54] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php"
}
]
[2023-07-21 16:54:54] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:54] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collectiontitem.blade.php"
]
[2023-07-21 16:54:54] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-21 16:54:54] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:54] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_index.blade.php"
]
[2023-07-21 16:54:55] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_index.blade.php"
}
]
[2023-07-21 16:54:55] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:55] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_product_detail.blade.php"
]
[2023-07-21 16:54:55] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-21 16:54:55] local.INFO: $this->paths [
[
"E:\\wwwroot\\xxx\\resources\\views",
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations"
]
]
[2023-07-21 16:54:55] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_search.blade.php"
]
[2023-07-21 16:54:58] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_product_detail.blade.php",
"migrate_search": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_search.blade.php"
}
]
[2023-07-21 16:54:58] local.INFO: $path [
"E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689929563.2923.2007177066\\migrations/migrate_cart.blade.php"
]
8、需要在每一次任务开始时,先清理掉上一次任务的视图缓存文件数组列表,即设置 $this->views 为空数组,添加 View::flushFinderCache();
public function __construct(string $defaultMigrationsLocation)
{
$this->location = $defaultMigrationsLocation;
View::flushFinderCache();
View::addLocation($this->location);
}
9、队列任务中不再报错,符合预期。如图1
PS E:\wwwroot\object> php artisan queue:work [2023-07-21 16:52:43][647NfQYdlkWp0PDUHKoIU4KdS8fXTC8B] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 16:53:53][647NfQYdlkWp0PDUHKoIU4KdS8fXTC8B] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 16:53:53][1oOabvsCvEz3doAqRiQb5c2ZcruRFRXu] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 16:54:54][1oOabvsCvEz3doAqRiQb5c2ZcruRFRXu] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 16:54:54][zPRP7HPO8z1yIL1Z2s46YEgHG3tLr35d] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 16:54:58][zPRP7HPO8z1yIL1Z2s46YEgHG3tLr35d] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 16:54:58][65v2ueRDyIDz69dUeddxljVzWx49F8y7] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 16:55:01][65v2ueRDyIDz69dUeddxljVzWx49F8y7] Failed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings PS E:\wwwroot\object> php artisan queue:work PS E:\wwwroot\object> php artisan queue:work PS E:\wwwroot\object> php artisan queue:work [2023-07-21 17:15:08][UzLDgMZEyxxD1D8e6TcZx7dwybSsqVBv] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:16:06][UzLDgMZEyxxD1D8e6TcZx7dwybSsqVBv] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:16:06][Kwamfg3C6YC2ZZ7O3aJVypgxTsvnfDe9] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:17:04][Kwamfg3C6YC2ZZ7O3aJVypgxTsvnfDe9] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:17:04][JdiepMQdkeiugOnK3p7hDiexoc9HyPkL] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:18:04][JdiepMQdkeiugOnK3p7hDiexoc9HyPkL] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-21 17:18:04][s0GprGgeeatIPqMigyCW3IgUZoHlKOgH] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 17:18:08][s0GprGgeeatIPqMigyCW3IgUZoHlKOgH] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 17:18:08][C1vtzAgil1cohbBJNeJywKmTYoTmSHBj] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 17:18:11][C1vtzAgil1cohbBJNeJywKmTYoTmSHBj] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 17:18:11][jsAPU1nPeLvZoB8wRgqK5CTuYYfjQ4kk] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-21 17:18:14][jsAPU1nPeLvZoB8wRgqK5CTuYYfjQ4kk] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings
10、再次查看日志,以确认代码实现逻辑。$this->views 在每一个任务中,已经不再是第 1 个任务的视图文件路径列表了。符合预期。如图2
[2023-07-21 17:18:04] local.INFO: $this->views [
[]
]
[2023-07-21 17:18:04] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_cart.blade.php"
}
]
[2023-07-21 17:18:05] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_collections.blade.php"
}
]
[2023-07-21 17:18:05] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-21 17:18:05] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930908.6638.1755291492\\migrations/migrate_index.blade.php"
}
]
[2023-07-21 17:18:08] local.INFO: $this->views [
[]
]
[2023-07-21 17:18:08] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\21\\1689930966.5702.629335870\\migrations/migrate_cart.blade.php"
}
]
11、最后决定还是将清空 $this->views 的操作放在每一个队列任务结束后执行,要更为合理一些。
/**
* 任务失败的处理过程
*
* @param Exception $exception
* @return void
*/
public function failed(Exception $exception)
{
// ...
View::flushFinderCache();
}
app(ThemeSettingMigrator::class, $parameters)->migrateThemeSettings($this->themeInstallation, $this->themeInstallationTask);
// 删除 解压缩 ZIP 后的目录及其下所有的文件
Storage::disk('local')->deleteDirectory(substr($this->themeInstallationTask->getRelativeDestination(), 1));
View::flushFinderCache();
12、再次查看日志,以确认代码实现逻辑。且同时执行2个监听器进程。$this->views 在每一个任务中,都是独立的视图文件路径列表了。虽然在日志输出的过程中,出现了任务交错执行的情况,但是其顺序皆是从0至5,并未出现任务下的文件路径为别的任务下的目录的情况。符合预期。如图3
PS E:\wwwroot\object> php artisan queue:work [2023-07-24 11:27:19][lduQutB2pi4Omu874hJZ7hDjrjT5GE54] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:28:33][lduQutB2pi4Omu874hJZ7hDjrjT5GE54] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:28:33][vSSRxnipf1yDn6yKHLGFF73aroBYIaw7] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:29:50][vSSRxnipf1yDn6yKHLGFF73aroBYIaw7] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:29:50][CbeGCSOBA7ChovzoZ0EaQq5967C6IXrK] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:31:14][CbeGCSOBA7ChovzoZ0EaQq5967C6IXrK] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:31:14][fdW6XlY5SfPo8aye9OBBVptwELwd0yvQ] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:20][fdW6XlY5SfPo8aye9OBBVptwELwd0yvQ] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:20][wkyphts0jZ8IQbtO8P39vqXpZTPPMiPa] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:25][wkyphts0jZ8IQbtO8P39vqXpZTPPMiPa] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:25][RzKG4cSFi80ERNeulaYUBkT3EGWxel1b] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:30][RzKG4cSFi80ERNeulaYUBkT3EGWxel1b] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings
PS E:\wwwroot\object> php artisan queue:work [2023-07-24 11:27:21][BuPYZVs4KAoN75cmBXTrYXEEs8sXFocA] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:28:35][BuPYZVs4KAoN75cmBXTrYXEEs8sXFocA] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:28:35][SmNvNkh8VBAfxnoZXmvVBEPcumTjjtNO] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:29:52][SmNvNkh8VBAfxnoZXmvVBEPcumTjjtNO] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:29:52][4Fpotr4ft2z95OJRNayQSE1fa5O15VgI] Processing: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:31:15][4Fpotr4ft2z95OJRNayQSE1fa5O15VgI] Processed: Modules\ThemeStoreDb\Jobs\InstallThemeToDb [2023-07-24 11:31:15][FHeFhYlVfISBKjrxL4IX4WpQnVTayveE] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:20][FHeFhYlVfISBKjrxL4IX4WpQnVTayveE] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:20][V05adIgcSOabBFdzZbFAD1o6XwIizkPL] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:25][V05adIgcSOabBFdzZbFAD1o6XwIizkPL] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:25][8LmZOVZVzu3zTHIlArKVNp8XnhMWZZfg] Processing: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings [2023-07-24 11:31:30][8LmZOVZVzu3zTHIlArKVNp8XnhMWZZfg] Processed: Modules\ThemeStoreDb\Jobs\MigrateThemeSettings
[2023-07-24 11:31:15] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:15] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:15] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:15] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:15] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:15] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169239.4539.1592596993\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-24 11:31:16] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:16] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:16] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:16] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:16] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:16] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169241.7525.1699877933\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-24 11:31:20] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:20] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:20] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:20] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169313.908.290770737\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:21] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169315.2833.851018770\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
[]
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_cart.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collections.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169390.5549.32763302\\migrations/migrate_product_detail.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collectiontitem.blade.php"
}
]
[2023-07-24 11:31:25] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_index.blade.php"
}
]
[2023-07-24 11:31:26] local.INFO: $this->views [
{
"migrate_cart": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_cart.blade.php",
"migrate_collections": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collections.blade.php",
"migrate_collectiontitem": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_collectiontitem.blade.php",
"migrate_index": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_index.blade.php",
"migrate_product_detail": "E:\\wwwroot\\xxx\\storage\\app\\theme_downloads\\2023\\07\\24\\1690169392.6276.729637306\\migrations/migrate_product_detail.blade.php"
}
]



1 条回复
[…] 1、参考:在 Laravel 6 中,在队列执行过程中,每一个任务的执行,皆会执行 View::addLoca… 。但是发现后续在生产环境中仍然存在问题。在队列执行过程中,一些视图文件未执行(”setting_migrations”:[])。如图1 […]