修改任务日志自动滚动逻辑

This commit is contained in:
whyour
2023-02-05 20:57:37 +08:00
parent 518436d5ca
commit 0144f3b131
6 changed files with 68 additions and 31 deletions
+1 -2
View File
@@ -124,8 +124,7 @@ handle_task_after() {
local end_timestamp=$(format_timestamp "$time_format" "$etime")
local diff_time=$(($end_timestamp - $begin_timestamp))
echo -e "\n\n## 执行结束... $end_time 耗时 $diff_time"
echo -e "\n     "
echo -e "\n\n## 执行结束... $end_time 耗时 $diff_time     "
[[ $ID ]] && update_cron "\"$ID\"" "1" "" "$log_path" "$begin_timestamp" "$diff_time"
}
+1 -2
View File
@@ -499,8 +499,7 @@ main() {
[[ $ID ]] && update_cron "\"$ID\"" "1" "" "$log_path" "$begin_timestamp" "$diff_time"
if [[ "$p1" != "repo" ]] && [[ "$p1" != "raw" ]]; then
eval echo -e "\\\n\#\# 执行结束... $end_time 耗时 $diff_time" $cmd
eval echo -e "\\\n          " $cmd
eval echo -e "\\\n\#\# 执行结束... $end_time 耗时 $diff_time     " $cmd
fi
if [[ -f $file_path ]]; then