Fix some bugs

This commit is contained in:
Firmlyzhu 2019-05-07 18:29:59 +08:00
parent 332a8b8ae1
commit 0ea558b988
3 changed files with 7 additions and 4 deletions

View File

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

View File

@ -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":

View File

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