承接 brettt89/silverstripe-garbage-collector 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

brettt89/silverstripe-garbage-collector

最新稳定版本:2.0.1

Composer 安装命令:

composer require brettt89/silverstripe-garbage-collector

包简介

SilverStripe Garbage Collector module

README 文档

README

PHPUnit codecov

Overview

Silverstripe module for defining and processing garbage collection on Silverstripe applications.

Installation

composer require brettt89/silverstripe-garbage-collector

Basic Usage

The example below shows how you can enable and configure the VersionedCollector and ChangeSetCollector for your application.

---
Name: GarbageCollectors
---
SilverStripe\GarbageCollector\Collectors\VersionedCollector:
  # Increase Versioned keep limit to 10 records
  keep_limit: 10
  # Define base classes to collect versions for
  base_classes:
    - SilverStripe\CMS\Model\SiteTree

SilverStripe\GarbageCollector\Collectors\ChangeSetCollector:
  # Reduce ChangeSet lifetime to 10 days
  deletion_lifetime: 10

# Register collectors with service
SilverStripe\GarbageCollector\GarbageCollectorService:
  collectors:
    - 'SilverStripe\GarbageCollector\Collectors\VersionedCollector'
    - 'SilverStripe\GarbageCollector\Collectors\ChangeSetCollector'

# Queue a RecurringAllGarbageCollectorJob if there isn't one already. It will then re-queue itself to run once a day.
Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor:
  extensions:
    - 'SilverStripe\GarbageCollector\Extensions\QueuedJobDescriptorExtension'

The example setup will create a job that runs all garbage collectors every day after running dev build. It does this by calling GarbageCollectorService::inst()->process();.

You may also decide to do this with some other process (BuildTask with Crontab that calls GarbageCollectorService::inst()->process();)

Documentation

Garbage Collection is based on the idea of removal/processing of records and items that may not have native garbage collection. This should be extendable to work with any type of data set as long as there are corresponding processors.

Components

Guides

Reporting Issues

Please create an issue for any bugs you've found, or features you're missing.

License

This module is released under the MIT License

Credits

This project is made possible by the community surrounding it and especially the wonderful people and projects listed in this document.

Contributors

Libraries

统计信息

  • 总下载量: 8.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 5
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-19