mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
@@ -150,7 +150,6 @@ def initSystemControl():
|
|||||||
path = 'data/default.db'
|
path = 'data/default.db'
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
data_ctl = 'data/control.conf'
|
data_ctl = 'data/control.conf'
|
||||||
mw.writeFile(data_ctl, '30')
|
mw.writeFile(data_ctl, '30')
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -36,6 +36,9 @@ import db
|
|||||||
import mw
|
import mw
|
||||||
import config_api
|
import config_api
|
||||||
|
|
||||||
|
import common
|
||||||
|
common.init()
|
||||||
|
|
||||||
app = Flask(__name__, template_folder='templates/default')
|
app = Flask(__name__, template_folder='templates/default')
|
||||||
app.config.version = config_api.config_api().getVersion()
|
app.config.version = config_api.config_api().getVersion()
|
||||||
|
|
||||||
@@ -107,11 +110,9 @@ if mw.isDebugMode():
|
|||||||
app.debug = True
|
app.debug = True
|
||||||
app.config.version = app.config.version + str(time.time())
|
app.config.version = app.config.version + str(time.time())
|
||||||
|
|
||||||
import common
|
|
||||||
common.init()
|
|
||||||
|
|
||||||
|
|
||||||
# ---------- error function start -----------------
|
# ---------- error function start -----------------
|
||||||
|
|
||||||
|
|
||||||
def getErrorNum(key, limit=None):
|
def getErrorNum(key, limit=None):
|
||||||
key = mw.md5(key)
|
key = mw.md5(key)
|
||||||
num = cache.get(key)
|
num = cache.get(key)
|
||||||
|
|||||||
Reference in New Issue
Block a user