update
This commit is contained in:
@@ -1,30 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#########################################################
|
||||
# python
|
||||
import os
|
||||
import traceback
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import time
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
|
||||
# third-party
|
||||
from flask import Blueprint, request, Response, send_file, render_template, redirect, jsonify
|
||||
from flask import (Blueprint, Response, jsonify, redirect, render_template,
|
||||
request, send_file)
|
||||
from framework import F, app, celery, path_app_root, path_data
|
||||
|
||||
from .model import ModelSetting
|
||||
# 패키지
|
||||
from .plugin import logger, package_name
|
||||
|
||||
# sjva 공용
|
||||
|
||||
from framework import F, path_app_root, path_data, celery, app
|
||||
|
||||
# 패키지
|
||||
from .plugin import logger, package_name
|
||||
from .model import ModelSetting
|
||||
|
||||
class SystemLogicEnv(object):
|
||||
@staticmethod
|
||||
def load_export():
|
||||
try:
|
||||
from support.base.file import SupportFile
|
||||
from support import SupportFile
|
||||
f = os.path.join(path_app_root, 'export.sh')
|
||||
if os.path.exists(f):
|
||||
return SupportFile.read_file(f)
|
||||
@@ -89,7 +90,7 @@ class SystemLogicEnv(object):
|
||||
def celery_test():
|
||||
if F.config['use_celery']:
|
||||
from celery import Celery
|
||||
from celery.exceptions import TimeoutError, NotRegistered
|
||||
from celery.exceptions import NotRegistered, TimeoutError
|
||||
|
||||
data = {}
|
||||
try:
|
||||
@@ -126,4 +127,4 @@ class SystemLogicEnv(object):
|
||||
return data
|
||||
except Exception as exception:
|
||||
logger.error('Exception:%s', exception)
|
||||
logger.error(traceback.format_exc())
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
Reference in New Issue
Block a user