From: Vincent Vanwaelscappel Date: Mon, 24 Jul 2023 09:42:55 +0000 (+0200) Subject: wip #6168 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d41502669a9b6ae79ca9dacb594a3ca4713a20c0;p=fluidbook-toolbox.git wip #6168 @0.75 --- diff --git a/.docker/images/php-dev/Dockerfile b/.docker/images/php-dev/Dockerfile index b2c74b1de..3d4bcaa0a 100644 --- a/.docker/images/php-dev/Dockerfile +++ b/.docker/images/php-dev/Dockerfile @@ -69,6 +69,7 @@ RUN apt -y --no-install-recommends install sshfs python3 python3-pip RUN apt -y --no-install-recommends install openssh-server rsyslog RUN apt -y --no-install-recommends install wine libwine wine64 RUN apt -y --no-install-recommends install pdfposter rename +RUN apt -y --no-install-recommends install jdupes RUN apt -y --no-install-recommends install locales RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \ diff --git a/.docker/images/php/Dockerfile b/.docker/images/php/Dockerfile index 4389f29b4..f3e7d4162 100644 --- a/.docker/images/php/Dockerfile +++ b/.docker/images/php/Dockerfile @@ -69,6 +69,7 @@ RUN apt -y --no-install-recommends install sshfs python3 python3-pip RUN apt -y --no-install-recommends install openssh-server rsyslog RUN apt -y --no-install-recommends install wine libwine wine64 RUN apt -y --no-install-recommends install pdfposter rename +RUN apt -y --no-install-recommends install jdupes RUN apt -y --no-install-recommends install locales RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \ diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 536d0bed5..515c9c33f 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -33,6 +33,7 @@ class Kernel extends \Cubist\Backpack\Console\Kernel $schedule->command('job:dispatchNow Maintenance\\\\CheckPublicationsHashAndCid')->dailyAt('3:00'); $schedule->command('job:dispatchNow Maintenance\\\\CleanDownloads')->dailyAt('4:00'); $schedule->command('job:dispatchNow Maintenance\\\\CleanFTP')->dailyAt('4:30'); + $schedule->command('job:dispatchNow Maintenance\\\\RemoveDuplicates')->monthly(); // WS to Toolbox migration $schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00'); $schedule->command('ws:migrate --publications=missing --documents=missing')->hourly(); diff --git a/app/Jobs/Maintenance/RemoveDuplicates.php b/app/Jobs/Maintenance/RemoveDuplicates.php new file mode 100644 index 000000000..da8da6285 --- /dev/null +++ b/app/Jobs/Maintenance/RemoveDuplicates.php @@ -0,0 +1,21 @@ +setArg('l'); + $jdupes->setArg('r'); + $jdupes->setArg(null, $directory); + $jdupes->execute(); + } + } +}