wwwision/asset-sync

Neos Flow 包,用于同步导入 Neos.Media 资产的元数据和二进制数据

资助包维护!
bwaidelich
Paypal

安装次数: 338

依赖项: 0

建议者: 0

安全性: 0

星标: 5

关注者: 3

分支: 1

公开问题: 0

类型:neos-package

1.1.0 2022-05-20 14:26 UTC

This package is auto-updated.

Last update: 2024-09-20 19:40:23 UTC


README

用于同步导入 Neos.Media 资产的元数据和资源的 Flow

安装

通过以下方式安装此包:

composer require wwwision/asset-sync

用法

运行

./flow media:synchronizeimportedassets

来更新所有导入资产的元数据。

使用以下选项来微调行为

  --asset-sources          Comma separated list of Asset Source identifiers to sync. If null, all imported assets are synced.
  --synchronize-resources  If set, resource binaries are synchronized (this can be slow!). Otherwise, only the asset metadata is updated.
  --batch-size             Number of assets to synchronize in a single run. Larger numbers can increase performance but may lead to high memory consumption
  --pool-size              Maximum number of sub processes to run at the same time
  --quiet                  If set only the number of errors is outputted (if any)

定时任务

为了保持导入的资产同步,应定期运行 synchronizeImportedAssets 命令,例如通过 cronjob。

以下设置将每小时同步指定资产源的资源元数据,每天同步一次相应的资源。

0 * * * * ./flow wwwision.assetsync:media:synchronizeimportedassets --asset-sources assetsource1,assetsource2 --quiet
30 0 * * * ./flow wwwision.assetsync:media:synchronizeimportedassets --asset-sources assetsource1,assetsource2 --synchronize-resources --quiet

批量和池大小

默认情况下,每次将处理 500 个资产,最多将执行 5 批次。这可以通过 --batch-size--pool-size 选项进行更改。有关详细信息,请参阅 Wwwision.BatchProcessing

致谢

本实现的部分灵感来自 Karsten Dambekalns 的工作。本包的开发得到了 Marktplatz GmbH - Agentur für Web & App 的慷慨赞助。感谢您对开源发展的支持!

贡献

非常欢迎以问题或拉取请求形式进行的贡献

许可证

请参阅 LICENSE