Fixed kill cron_movies, added daily reindex

This commit is contained in:
zeldaroot 2021-06-12 02:11:39 +03:00
parent 5d30bef966
commit 6f1af9565c
3 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ RUN set -o pipefail \
&& cp -rf themes/default/public/admin/favicon.ico favicon.ico \
&& cp -rf themes/default/public/desktop/img/player$(( ( RANDOM % 7 ) + 1 )).png \
themes/default/public/desktop/img/player.png \
&& echo -e "#!/bin/bash\n/usr/bin/cinemapress container backup create >> /home/\${CP_DOMAIN}/log/backup_\$(date '+%d_%m_%Y').log" \
&& echo -e "#!/bin/bash\nsleep \$((60 + RANDOM % 60));\n/usr/bin/cinemapress container reindex save >> /home/\${CP_DOMAIN}/log/backup_\$(date '+%d_%m_%Y').log;\nsleep \$((30 + RANDOM % 60));\n/usr/bin/cinemapress container backup create >> /home/\${CP_DOMAIN}/log/backup_\$(date '+%d_%m_%Y').log;\nrm -f /home/\${CP_DOMAIN}/log/cron_movies.pid;\nfind /home/\${CP_DOMAIN}/log -mindepth 1 -mtime +14 -delete;" \
> /etc/periodic/daily/backup \
&& chmod a+x /etc/periodic/daily/backup \
&& echo -e "#!/bin/bash\n/usr/bin/cinemapress container cron >> /home/\${CP_DOMAIN}/log/cron_\$(date '+%d_%m_%Y').log" \

View file

@ -2331,7 +2331,7 @@ docker_movies() {
}
docker_cron() {
nohup /usr/bin/cinemapress torrent "${CP_DOMAIN}" upload \
>/home/"${CP_DOMAIN}"/log/torrent_"$(date '+%d_%m_%Y')".log 2>&1 &
>> /home/"${CP_DOMAIN}"/log/torrent_"$(date '+%d_%m_%Y')".log 2>&1 &
if [ ! -f /home/"${CP_DOMAIN}"/log/cron_movies.pid ]; then
echo $$ >/home/"${CP_DOMAIN}"/log/cron_movies.pid
if [ -n "${1}" ]; then

View file

@ -1082,7 +1082,7 @@ if (Math.ceil(os.freemem()) < 50) {
'[REALTIME]',
'STOP PAGE (' + (6 - fail_req) + ' fails)',
url_req,
(err.response && err.response.status) || err,
(err.response && err.response.status) || err.code || err,
movies_proxy ? 'PROXY ' + movies_proxy : ''
);
fail_req = fail_req - 1;
@ -1300,7 +1300,7 @@ if (Math.ceil(os.freemem()) < 50) {
iter_req ? '[' + iter_req + ']' : '',
'ERROR MOVIE',
task_url,
(err.response && err.response.status) || err,
(err.response && err.response.status) || err.code || err,
movies_proxy ? 'PROXY ' + movies_proxy : ''
);
return callback();