mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-09-29 08:11:14 +00:00
state edit
This commit is contained in:
parent
4b94da339b
commit
fbe77d2cde
|
@ -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
|
||||
|
|
|
@ -59,13 +59,13 @@ def AppAutoUpdate(auto_update):
|
|||
myLogger.info_logger(scheduler.state)
|
||||
myLogger.info_logger(scheduler.get_jobs())
|
||||
if auto_update:
|
||||
if scheduler.state == EVENT_SCHEDULER_RESUMED or scheduler.state == EVENT_SCHEDULER_STARTED:
|
||||
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()
|
||||
return "软件商店自动更新已经开启"
|
||||
else:
|
||||
if scheduler.state == EVENT_SCHEDULER_PAUSED:
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue