mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 15:10:22 +00:00
auto_update
This commit is contained in:
parent
7fc46813b6
commit
c67111bdda
6 changed files with 20 additions and 16 deletions
2
.github/workflows/appmanage_docker.yml
vendored
2
.github/workflows/appmanage_docker.yml
vendored
|
@ -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
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 0.7.2 release on 2023-06-25
|
||||
|
||||
appmanage 自动更新接口升级
|
||||
|
||||
## 0.7.1 release on 2023-06-21
|
||||
|
||||
appmanage version 文件意外删除时 bug 修改
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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():
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
}
|
Loading…
Reference in a new issue