From 218394ed2828e761883f860523d30ca66d01b846 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Fri, 12 Apr 2024 13:06:02 +0000 Subject: [PATCH] sftp-into-eye: add ionice -c 3 nice --- sftp-into-eye | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sftp-into-eye b/sftp-into-eye index aea4764..db8de88 100755 --- a/sftp-into-eye +++ b/sftp-into-eye @@ -45,7 +45,7 @@ while read i; do # This is mostly a demo which adds it to ceph over SFTP with `rclone`; # ideally we instead have the `es x get -s -- "$i"` step putting it directly into ceph. ( - es x get -s -- "$i" && \ + ionice -c 3 nice es x get -s -- "$i" && \ rclone --metadata --inplace --size-only --progress copyto "$i" "$RCLONE_DEST:$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\": $the_eye_video_bytes_saved, \"the_eye_any_files_saved\": 1, \"the_eye_video_files_saved\": $the_eye_video_files_saved}" "http://eye.borg.xyz:31416/metrics" || true;