Feat: Restructuring MigrateImport, Dispatching a per product job for import
This commit is contained in:
@@ -10,7 +10,7 @@ use Modules\Core\Catalog\Services\SkuBackfillService;
|
||||
* CLI wrapper (--dry-run, a progress bar) around Catalog\Services\
|
||||
* SkuBackfillService — see that class's own docblock for the actual
|
||||
* backfill logic, also called automatically after a Shopify import (see
|
||||
* MigrateImport\RunMigrateImportJob).
|
||||
* MigrateImport\Jobs\RunMigrateImportJob).
|
||||
*/
|
||||
class BackfillMissingSkusCommand extends Command
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Modules\Core\Command;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Lunar\Models\Language;
|
||||
use Modules\Core\MigrateImport\ImportSpec;
|
||||
use Modules\Core\MigrateImport\RunMigrateImportJob;
|
||||
use Modules\Core\MigrateImport\DTOs\ImportSpec;
|
||||
use Modules\Core\MigrateImport\Jobs\RunMigrateImportJob;
|
||||
|
||||
class MigrateImportCommand extends Command
|
||||
{
|
||||
@@ -67,7 +67,7 @@ class MigrateImportCommand extends Command
|
||||
// (HTML)/etc. column per row, no per-locale columns at all — so
|
||||
// its text is necessarily written in exactly one language, and
|
||||
// there is no reliable way to detect which one from the file
|
||||
// itself. Modules\Core\MigrateImport\ImportLocale::code() used to
|
||||
// itself. Modules\Core\MigrateImport\Services\ImportLocale::code() used to
|
||||
// (as its former name, DefaultLocale, admits) assume it always
|
||||
// matched this store's own Lunar\Models\
|
||||
// Language::getDefault(), which is often wrong (a store's default
|
||||
|
||||
@@ -142,7 +142,7 @@ class WipeCatalogCommand extends Command
|
||||
* for the skipped products) whose 'image' ImportMapping rows then
|
||||
* caused a LATER Shopify re-import to silently reuse those now-
|
||||
* orphaned Media objects instead of importing fresh ones — see
|
||||
* MigrateImport\Shopify\ShopifyExportImporter::resolveOrImportImage()'s
|
||||
* MigrateImport\Shopify\Services\ShopifyExportImporter::resolveOrImportImage()'s
|
||||
* own docblock for that half of the same incident. Always re-querying
|
||||
* the first N remaining rows (never advancing an id cursor) guarantees
|
||||
* every product is actually visited exactly once, however many are
|
||||
|
||||
Reference in New Issue
Block a user