Sfoglia il codice sorgente

sftp-into-eye: es x get -s; clean up temporary file

master
Ivan Kozik 1 mese fa
parent
commit
406cea9151
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. +3
    -2
      sftp-into-eye

+ 3
- 2
sftp-into-eye Vedi File

@@ -27,10 +27,11 @@ es x find -t f -- "$root" | take-wanted-ids ~/dead-video-ids | rg '\.(mp4|webm|f
es x info -- "$i" | rg -q -F '"type": "namedfiles"' && continue || true

(
es x get "$i" && \
es x get -s -- "$i" && \
rclone --inplace --size-only --progress copyto "$i" "jeff:$eye_path" && \
curl --fail-with-body -u "ya: ." -X POST -d "{\"file_id\": $file_id, \"location\": \"the-eye\", \"pathname\": \"$eye_path\"}" https://ya.borg.xyz/cgi-bin/new-namedfiles && \
curl -X POST -d "{\"the_eye_any_bytes_saved\": $size, \"the_eye_video_bytes_saved\": $size, \"the_eye_any_files_saved\": 1, \"the_eye_video_files_saved\": 1}" "http://127.0.0.1:31416/metrics" || true
curl -X POST -d "{\"the_eye_any_bytes_saved\": $size, \"the_eye_video_bytes_saved\": $size, \"the_eye_any_files_saved\": 1, \"the_eye_video_files_saved\": 1}" "http://127.0.0.1:31416/metrics" || true;
rm -f -- "$i"
) &

wait-until-jobs-below 16


Caricamento…
Annulla
Salva