remember failed tasks in a separate directory

This commit is contained in:
Dirk Müller 2024-06-10 17:04:43 +02:00
parent 2ff8ed76d0
commit 022ae5ab58
No known key found for this signature in database

View File

@ -6,11 +6,14 @@ source credentials.sh
while true; do
for i in $PWD/tasks/*; do
echo "$(date): Importing $(basename $i)"
if ! python3 ./git-importer.py -c repos/.cache $(basename $i); then
mkdir -p $PWD/failed-tasks
mv $i $PWD/failed-tasks
fi
if test -f "$i"; then
echo "$(date): Importing $(basename $i)"
if ! python3 ./git-importer.py -c repos/.cache $(basename $i); then
mkdir -p $PWD/failed-tasks
mv -f $i $PWD/failed-tasks
fi
rm -f $i
fi
done
inotifywait -q -e create $PWD/tasks
done