From c087873575c9807fa9aa25f251b526925ed99fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Wed, 26 Apr 2023 10:29:34 +0200 Subject: [PATCH] feat: add new alias reset_all_quarantined_sips --- tasks/configure_processing_user.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/configure_processing_user.yml b/tasks/configure_processing_user.yml index a077300..2ec85a8 100644 --- a/tasks/configure_processing_user.yml +++ b/tasks/configure_processing_user.yml @@ -109,3 +109,4 @@ alias quarantine_summary='echo -e "$( ls ~/.subapp/quarantine/ | wc -l ) SIPs in quarantine.\n"; readarray -d "" sips < <(find ~/.subapp/quarantine -mindepth 1 -maxdepth 1 -print0 -type d); for sip in "${sips[@]}"; do sip="$(basename "${sip}")"; echo "$( du -sh "/mnt/import/${sip}" ),# $( stat -c %y "~/.subapp/quarantine/${sip}/sip.ERROR" ),# $( find "/mnt/import/${sip}/" -type f | wc -l) files"; done | column -s "#" -t' alias next='/usr/bin/perl -I /usr/local/perl/ /usr/local/bin/subapp_bagit.pl --config-file /home/processing/.subapp/subapp.cfg --single_run; echo "################# LOG #####################"; echo "last 10 lines..."; tail -n 10 /var/log/subapp/sips.log; echo "################# PROBLEMS #####################"; START=$( grep -n "starting..." /var/log/subapp/subapp.log | tail -1 | cut -f1 -d: ); ALL_LINES=$( wc -l < /var/log/subapp/subapp.log ); let LINES=$ALL_LINES-$START; echo "checking last $LINES log lines..."; tail -n $LINES /var/log/subapp/subapp.log | grep --color -e "\[ERROR\]" -e "\[FATAL\]" -e "\[WARN\]"' + alias reset_all_quarantined_sips='subapp --reset_failed_preingests $(readarray -d "" sips < <(find ~/.subapp/quarantine -mindepth 1 -maxdepth 1 -print0 -type d); for sip in "${sips[@]}"; do sip="$(basename "${sip}")"; echo "/mnt/import/${sip}"; done | tr "\n" " ")' -- GitLab