ReportFileCleaner (optional)
https://github.com/magesuite/magesuite-report-file-cleaner
The module was created in order to avoid cases when hundreds of thousands of files were placed in var/report which slowed down file operations and the deployment process. The module allows periodic cleaning of files.
Â
Installation
This module is optional.
composer require "creativestyle/magesuite-report-file-cleaner" ^1.0.0
Admin settings
Admin setting can be found under Stores -> Configuration -> Advanced -> System
in the Report File Cleaner
tab.
The module is disabled by default when installed.
Settings:
Field | Options | Comment |
---|---|---|
Enabled | Yes/No |  |
Period of storing files in days | Â | Â |
Cleaning files cron schedule expression | Default: 0 0 15 * * | Â |
Cleaning files patterns | Default: report/* | The base directory is var/ Currently stored files amount: /var/www/projects/creativeshop/var/report/*: 34 |
Â
Backend
Documentation is in progress
Cron
vendor/creativestyle/magesuite-report-file-cleaner/Cron/CleanFiles.php:33
class CleanFiles
{
public function execute()
{
.....
$this->logFilesCleaner->cleanFiles();
return true;
}
}
Â
Command
system:clean_report_files
vendor/creativestyle/magesuite-report-file-cleaner/Console/Command/CleanFiles.php:38
class CleanFiles extends \Symfony\Component\Console\Command\Command
{
protected function execute(
\Symfony\Component\Console\Input\InputInterface $input,
\Symfony\Component\Console\Output\OutputInterface $output
) {
.....
$logFilesCleaner = $this->logFilesCleanerFactory->create();
$logFilesCleaner->cleanFiles();
return true;
}
}
Â
Service for removing files
Â
Frontend
There is no frontend functionality in this module.