matthewkp/ez-clean-up-versions

此工具会清理 eZ 平台中的所有内容的所有版本

安装: 982

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 1

开放问题: 0

类型:ezplatform-bundle

3.0.0 2019-08-17 09:12 UTC

This package is auto-updated.

Last update: 2024-09-17 20:30:41 UTC


README

此脚本会移除 eZ 平台所有内容的旧版本。

版本

  • 分支 v1 & 标签 1.x : eZ 平台 v1.x
  • 分支 v2 & 标签 2.x : eZ 平台 v2.x

安装包

composer require matthewkp/ez-clean-up-versions

注册包

// app/AppKernel.php

class AppKernel extends Kernel
{
    ...
    public function registerBundles()
    {
        ...
        $bundles = [
            ...
            new Matthewkp\EzCleanUpVersionsBundle\MatthewkpEzCleanUpVersionsBundle(),
            ...
        ];
        ...
    }
}

参数

  • 添加 -v 以获取有关内容版本和版本 ID 删除的完整信息。
  • 添加 --keep 以设置要保留的版本数
  • 添加 --locationId 以设置开始处理的根位置 ID

添加到 crontab

// /etc/cron.d/<your_cron_file> or /var/spool/cron/apache
0 0 * * * <user> cd <your_site_path> && php bin/console matthewkp:ez-clean-up-versions --env=<ENV> > 2>&1