--cleanup-feed
在重新索引并将数据发送到SaaS之前,请清理馈送索引器表。 仅支持products
、productAttributes
、productOverrides
、inventoryStockStatus
、prices
、variants
和categoryPermissions
。
如果与--dry-run
选项一起使用,则该操作将对所有项目执行试运行重新同步操作。
仅在环境清理后或通过
--dry-run
选项使用。 如果用于其他情况,清理操作可能会导致数据丢失和数据同步问题。示例:
bin/magento saas:resync --feed products --cleanup-feed
--continue-resync
恢复中断的重新同步操作。 仅支持products
、productAttributes
和productOverrides
馈送。
示例:
bin/magento saas:resync --feed productAttributes --continue-resync
--dry-run
在不将馈送提交到SaaS且不保存到馈送表的情况下,运行馈送重新索引过程。 此选项对于识别数据集的任何问题很有用。
添加EXPORTER_EXTENDED_LOG=1
环境变量以将有效负载保存到var/log/saas-export.log
。
示例:
EXPORTER_EXTENDED_LOG=1 bin/magento saas:resync --feed products --dry-run
测试特定信息源项目
通过将--by-ids
选项与扩展日志集合一起添加来测试特定馈送项目,以查看var/log/saas-export.log
文件中生成的有效负载。
示例:
EXPORTER_EXTENDED_LOG=1 bin/magento saas:resync --feed products --dry-run --by-ids='ADB102,ADB111,ADB112'
测试所有馈送项目
默认情况下,在resync --dry-run
操作期间提交的信息源仅包含新项目,或以前无法导出的项目。 要在要处理的信息源中包含所有项,请使用--cleanup-feed
选项。
示例
bin/magento saas:resync --feed products --dry-run --cleanup-feed
--feed
必需。 指定要重新同步的馈送实体。
可用信息源:
categories
categoryPermissions
inventoryStockStatus
orders
prices
products
productAttributes
productOverrides
scopesWebsite
scopesCustomerGroup
variants
示例:
bin/magento saas:resync --feed products
- 旧版模式:重新提交所有数据而不截断。
- 立即模式:忽略选项,仅同步更新/失败。
示例:
bin/magento saas:resync --feed productAttributes --no-reindex