qiaofeng1227 пре 2 година
родитељ
комит
fbe77d2cde
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      appmanage/Dockerfile
  2. 2 2
      appmanage/api/service/manage.py

+ 1 - 1
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

+ 2 - 2
appmanage/api/service/manage.py

@@ -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()