From 333049206f03435cea338a9a4032cdf39ff3077c Mon Sep 17 00:00:00 2001 From: ouqiang Date: Fri, 5 May 2017 17:10:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E4=BF=AE=E6=94=B9=E4=B8=BAgocron-os?= =?UTF-8?q?-arch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 4 ++-- routers/task/task.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index c38aa06..4b16b9c 100644 --- a/build.sh +++ b/build.sh @@ -61,10 +61,10 @@ echo '编译完成' if [[ $OS = 'windows' ]];then EXEC_NAME=${APP_NAME}.exe - COMPRESS_FILE=${APP_NAME}.zip + COMPRESS_FILE=${APP_NAME}-${OS}-${ARCH}.zip else EXEC_NAME=${APP_NAME} - COMPRESS_FILE=${APP_NAME}.tar.gz + COMPRESS_FILE=${APP_NAME}-${OS}-${ARCH}.tar.gz fi mkdir -p $TEMP_DIR/$APP_NAME diff --git a/routers/task/task.go b/routers/task/task.go index 4d72a7f..857863d 100644 --- a/routers/task/task.go +++ b/routers/task/task.go @@ -153,7 +153,7 @@ func Store(ctx *macaron.Context, form TaskForm) string { if taskModel.Protocol == models.TaskHTTP && taskModel.Timeout == -1 { return json.CommonFailure("HTTP任务不支持后台运行", err) } - if taskModel.RetryTimes > 10 || taskModel < 0 { + if taskModel.RetryTimes > 10 || taskModel.RetryTimes < 0 { return json.CommonFailure("任务重试次数取值0-10") } if id == 0 {