diff --git a/src/master/releasemgr.py b/src/master/releasemgr.py index 1d75eb6..2d276fd 100644 --- a/src/master/releasemgr.py +++ b/src/master/releasemgr.py @@ -1,4 +1,4 @@ -import threading, time +import threading, time, requests, json from utils import env from utils.log import logger from utils.model import db, VCluster, Container diff --git a/src/utils/env.py b/src/utils/env.py index 16eacb5..b75bca0 100755 --- a/src/utils/env.py +++ b/src/utils/env.py @@ -80,9 +80,9 @@ def getenv(key): elif key =="ALLOW_SCALE_OUT": return os.environ.get("ALLOW_SCALE_OUT", "False") elif key == "WARNING_DAYS": - return os.environ.get("WARNING_DAYS"."7") + return os.environ.get("WARNING_DAYS", "7") elif key == "RELEASE_DAYS": - return os.environ.get("RELEASE_DAYS"."14") + return os.environ.get("RELEASE_DAYS", "14") elif key == "BATCH_ON": return os.environ.get("BATCH_ON","True") elif key == "BATCH_MASTER_PORT": diff --git a/src/utils/manage.py b/src/utils/manage.py index f947b9a..67e4940 100644 --- a/src/utils/manage.py +++ b/src/utils/manage.py @@ -1,5 +1,8 @@ +import sys +if sys.path[0].endswith("utils"): + sys.path[0] = sys.path[0][:-5] from flask_migrate import Migrate,MigrateCommand -from model import * +from utils.model import * from flask_script import Manager from flask import Flask