mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复TempCk问题,修复ql raw拉取任务重复
This commit is contained in:
+5
-4
@@ -89,7 +89,7 @@ del_cron() {
|
||||
local ids=""
|
||||
echo -e "开始尝试自动删除失效的定时任务...\n"
|
||||
for cron in $(cat $list_drop); do
|
||||
local id=$(cat $list_crontab_user | grep -E "$cmd_task $cron$" | perl -pe "s|.*ID=(.*) $cmd_task $cron$|\1|" | xargs | sed 's/ /","/g')
|
||||
local id=$(cat $list_crontab_user | grep -E "$cmd_task $cron" | perl -pe "s|.*ID=(.*) $cmd_task $cron|\1|" | xargs | sed 's/ /","/g' | head -1)
|
||||
if [[ $ids ]]; then
|
||||
ids="$ids,\"$id\""
|
||||
else
|
||||
@@ -195,7 +195,7 @@ update_raw() {
|
||||
echo -e "下载 ${raw_file_name} 成功...\n"
|
||||
cd $dir_raw
|
||||
local filename="raw_${raw_file_name}"
|
||||
local cron_id=$(cat $list_crontab_user | grep -E "$cmd_task $filename$" | perl -pe "s|.*ID=(.*) $cmd_task $filename$|\1|")
|
||||
local cron_id=$(cat $list_crontab_user | grep -E "$cmd_task $filename" | perl -pe "s|.*ID=(.*) $cmd_task $filename\.*|\1|" | head -1)
|
||||
cp -f $raw_file_name $dir_scripts/${filename}
|
||||
cron_line=$(
|
||||
perl -ne "{
|
||||
@@ -253,7 +253,8 @@ usage() {
|
||||
update_qinglong() {
|
||||
echo -e "--------------------------------------------------------------\n"
|
||||
[ -f $dir_root/package.json ] && ql_depend_old=$(cat $dir_root/package.json)
|
||||
reset_romote_url ${dir_root} "${github_proxy_url}https://github.com/whyour/qinglong.git"
|
||||
url=https://github.com/whyour/qinglong.git
|
||||
reset_romote_url ${dir_root} "${github_proxy_url}${url/https:\/\/ghproxy.com\//}"
|
||||
git_pull_scripts $dir_root
|
||||
|
||||
if [[ $exit_status -eq 0 ]]; then
|
||||
@@ -380,7 +381,7 @@ gen_list_repo() {
|
||||
filename=$(basename $file)
|
||||
cp -f $file $dir_scripts/${repo}_${filename}
|
||||
echo ${repo}_${filename} >>"$dir_list_tmp/${repo}_scripts.list"
|
||||
cron_id=$(cat $list_crontab_user | grep -E "$cmd_task ${author}_${filename}" | perl -pe "s|.*ID=(.*) $cmd_task ${author}_${filename}\.*|\1|")
|
||||
cron_id=$(cat $list_crontab_user | grep -E "$cmd_task ${author}_${filename}" | perl -pe "s|.*ID=(.*) $cmd_task ${author}_${filename}\.*|\1|" | head -1)
|
||||
if [[ $cron_id ]]; then
|
||||
result=$(update_cron_command_api "$cmd_task ${repo}_${filename}:$cron_id")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user