diff --git a/.github/workflows/appmanage_docker.yml b/.github/workflows/appmanage_docker.yml index a304b5ca..55fcce3a 100644 --- a/.github/workflows/appmanage_docker.yml +++ b/.github/workflows/appmanage_docker.yml @@ -22,7 +22,7 @@ jobs: name: Build & push Docker image with: image: websoft9dev/appmanage - tags: 0.7.1 + tags: 0.7.2 registry: docker.io dockerfile: appmanage/Dockerfile directory: appmanage diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3c3667..21d889a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.2 release on 2023-06-25 + +appmanage 自动更新接口升级 + ## 0.7.1 release on 2023-06-21 appmanage version 文件意外删除时 bug 修改 diff --git a/appmanage/Dockerfile b/appmanage/Dockerfile index ef28a3a5..d6cf741e 100644 --- a/appmanage/Dockerfile +++ b/appmanage/Dockerfile @@ -10,7 +10,7 @@ COPY static ./static COPY requirements.txt main.py ./ RUN apt update -# Install supervisord +# Install supervisords RUN apt install -y supervisor COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/cmd.sh /cmd.sh diff --git a/appmanage/api/service/manage.py b/appmanage/api/service/manage.py index b2a27218..9c619e7a 100644 --- a/appmanage/api/service/manage.py +++ b/appmanage/api/service/manage.py @@ -54,18 +54,18 @@ def AppAutoUpdate(auto_update): myLogger.info_logger(scheduler.state) myLogger.info_logger(scheduler.get_jobs()) - if auto_update: - if scheduler.state == "1": - raise CommandException(const.ERROR_CLIENT_PARAM_REPEAT,"auto_update already in running state", "auto_update already in running state") + if auto_update == "true" or auto_update == "True": + scheduler.resume() + return "true" + elif auto_update == "false" or auto_update == "False": + scheduler.pause() + return "false" + elif auto_update == None or auto_update == "" or auto_update == "undefine": + state = scheduler.state + if state == 1: + return "true" else: - scheduler.resume() - return "软件商店自动更新已经开启" - else: - if scheduler.state == "2": - raise CommandException(const.ERROR_CLIENT_PARAM_REPEAT,"auto_update already in closed state", "auto_update already in closed state") - else: - scheduler.pause() - return "软件商店自动更新已经关闭" + return "false" # 更新软件商店 def AppStoreUpdate(): diff --git a/docker/w9appmanage/.env b/docker/w9appmanage/.env index 9bb34124..38d91914 100644 --- a/docker/w9appmanage/.env +++ b/docker/w9appmanage/.env @@ -1,4 +1,4 @@ APP_NAME=websoft9-appmanage -APP_VERSION=0.7.1 +APP_VERSION=0.7.2 APP_HTTP_PORT=5000 APP_NETWORK=websoft9 diff --git a/install/version.json b/install/version.json index 99695e03..40da8fd0 100644 --- a/install/version.json +++ b/install/version.json @@ -2,8 +2,8 @@ "SERVICES": { "PORTAINER": "2.18.3", "NGINX": "2.10.3", - "APPMANAGE": "0.7.1", + "APPMANAGE": "0.7.2", "REDIS": "7.0.11" }, - "VERSION": "0.7.1" + "VERSION": "0.7.2" } \ No newline at end of file