瀏覽代碼

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

master
Ivan Kozik 1 月之前
父節點
當前提交
406cea9151
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      sftp-into-eye

+ 3
- 2
sftp-into-eye 查看文件

@@ -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


Loading…
取消
儲存