Logidav Docs

ProductCommand extends ContainerAwareCommand
in package
uses LockableTrait

FinalYes

Console workflow that synchronises Magento 2 catalog updates into Logidav.

The command is scheduled through the menzzo:v2:products cron entry and orchestrates the following workflow:

  • Acquire a lock whose key is derived from the optional --syncFast flag so concurrent imports targeting the same mode cannot run in parallel.
  • Resolve the Doctrine entity manager and Magento product API client from the container before starting the import loop.
  • Read or create the progress marker stored in data/flags/product.flag to resume from the last imported Magento entity ID when running a full sync.
  • Depending on --syncFast, either call getProductsFast() for a delta-driven import or getProducts() for the full catalogue refresh.
  • Persist the retrieved products and update the progress marker so subsequent runs continue from the correct offset.

Operators can inspect the command help (bin/console menzzo:v2:products --help) for a condensed version of this workflow.

Table of Contents

Properties

$dbConnection  : mixed
$em  : EntityManager
$firstRun  : mixed
$limit  : int
$output  : OutputInterface
$page  : mixed
$productApi  : ProductApi|object
$systemAlertService  : SystemAlertService|null

Methods

__construct()  : mixed
ProductCommand constructor.
getLogidavId()  : int
getProducts()  : mixed
Get products for logidav
getProductsFast()  : mixed
getProductsOnlyCategories()  : mixed
getProductsStoreData()  : mixed
Get product store data
configure()  : mixed
Configure command
execute()  : mixed

Properties

$dbConnection

protected mixed $dbConnection
Tags
@var

$dbConnection

Methods

getLogidavId()

public getLogidavId(mixed $item) : int
Parameters
$item : mixed
Return values
int

getProducts()

Get products for logidav

public getProducts(mixed $output, mixed $input) : mixed
Parameters
$output : mixed
$input : mixed
Tags
throws
GuzzleException
throws
OptimisticLockException

getProductsFast()

public getProductsFast(mixed $output, mixed $input) : mixed
Parameters
$output : mixed
$input : mixed

getProductsOnlyCategories()

public getProductsOnlyCategories(mixed $output) : mixed
Parameters
$output : mixed

getProductsStoreData()

Get product store data

public getProductsStoreData(mixed $productIds, mixed $productsData) : mixed
Parameters
$productIds : mixed
$productsData : mixed

execute()

protected execute(InputInterface $input, OutputInterface $output) : mixed
Parameters
$input : InputInterface
$output : OutputInterface

        
On this page

Search results