auto_update

This commit is contained in:
qiaofeng1227 2023-06-25 15:16:03 +08:00
parent 7fc46813b6
commit c67111bdda
6 changed files with 20 additions and 16 deletions

View file

@ -22,7 +22,7 @@ jobs:
name: Build & push Docker image name: Build & push Docker image
with: with:
image: websoft9dev/appmanage image: websoft9dev/appmanage
tags: 0.7.1 tags: 0.7.2
registry: docker.io registry: docker.io
dockerfile: appmanage/Dockerfile dockerfile: appmanage/Dockerfile
directory: appmanage directory: appmanage

View file

@ -1,3 +1,7 @@
## 0.7.2 release on 2023-06-25
appmanage 自动更新接口升级
## 0.7.1 release on 2023-06-21 ## 0.7.1 release on 2023-06-21
appmanage version 文件意外删除时 bug 修改 appmanage version 文件意外删除时 bug 修改

View file

@ -10,7 +10,7 @@ COPY static ./static
COPY requirements.txt main.py ./ COPY requirements.txt main.py ./
RUN apt update RUN apt update
# Install supervisord # Install supervisords
RUN apt install -y supervisor RUN apt install -y supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/cmd.sh /cmd.sh COPY config/cmd.sh /cmd.sh

View file

@ -54,18 +54,18 @@ def AppAutoUpdate(auto_update):
myLogger.info_logger(scheduler.state) myLogger.info_logger(scheduler.state)
myLogger.info_logger(scheduler.get_jobs()) myLogger.info_logger(scheduler.get_jobs())
if auto_update: if auto_update == "true" or auto_update == "True":
if scheduler.state == "1":
raise CommandException(const.ERROR_CLIENT_PARAM_REPEAT,"auto_update already in running state", "auto_update already in running state")
else:
scheduler.resume() scheduler.resume()
return "软件商店自动更新已经开启" return "true"
else: elif auto_update == "false" or auto_update == "False":
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() scheduler.pause()
return "软件商店自动更新已经关闭" return "false"
elif auto_update == None or auto_update == "" or auto_update == "undefine":
state = scheduler.state
if state == 1:
return "true"
else:
return "false"
# 更新软件商店 # 更新软件商店
def AppStoreUpdate(): def AppStoreUpdate():

View file

@ -1,4 +1,4 @@
APP_NAME=websoft9-appmanage APP_NAME=websoft9-appmanage
APP_VERSION=0.7.1 APP_VERSION=0.7.2
APP_HTTP_PORT=5000 APP_HTTP_PORT=5000
APP_NETWORK=websoft9 APP_NETWORK=websoft9

View file

@ -2,8 +2,8 @@
"SERVICES": { "SERVICES": {
"PORTAINER": "2.18.3", "PORTAINER": "2.18.3",
"NGINX": "2.10.3", "NGINX": "2.10.3",
"APPMANAGE": "0.7.1", "APPMANAGE": "0.7.2",
"REDIS": "7.0.11" "REDIS": "7.0.11"
}, },
"VERSION": "0.7.1" "VERSION": "0.7.2"
} }