<reponame>saowu/FigureBed
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

' a test module '

__author__ = 'saowu'

import logging
import os
import time


class UploadConfig(object):
    # 外网ip和端口（如果添加了nginx代理，需要改成nginx的对外端口）
    IP = "http://127.0.0.1:8000/"
    # images path
    UPLOAD_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + '/myDataVolume/uploads/'
    # csv path
    RECORD_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + '/myDataVolume/records/'


class DBConfig(object):
    # mysql Docker部署可填宿主机内网ip
    DB_HOST = '10.141.42.181'
    DB_PORT = '3306'
    DATABASE = 'figurebed'
    USER_NAME = 'root'
    PASSWORD = '<PASSWORD>'


class LogConfig(object):
    # logging
    LOG_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + "/myDataVolume/fb_logs/"
    LOG_FILENAME = 'logger-' + time.strftime('%Y-%m-%d', time.localtime(time.time())) + ".log"


class SchedulerConfig(object):
    # 定时任务
    JOBS = [
        {
            'id': 'clean_csv_files',
            'func': 'app:utils.apsutils.clean_csv_files',
            'trigger': 'interval',
            'days': 1,
            # 'seconds': 20,
        }
    ]
    SCHEDULER_API_ENABLED = True

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

' a test module '

__author__ = 'saowu'

import logging
import os
import time


class UploadConfig(object):
    # 外网ip和端口（如果添加了nginx代理，需要改成nginx的对外端口）
    IP = "http://127.0.0.1:8000/"
    # images path
    UPLOAD_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + '/myDataVolume/uploads/'
    # csv path
    RECORD_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + '/myDataVolume/records/'


class DBConfig(object):
    # mysql Docker部署可填宿主机内网ip
    DB_HOST = '10.141.42.181'
    DB_PORT = '3306'
    DATABASE = 'figurebed'
    USER_NAME = 'root'
    PASSWORD = '<PASSWORD>'


class LogConfig(object):
    # logging
    LOG_FOLDER = os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) + "/myDataVolume/fb_logs/"
    LOG_FILENAME = 'logger-' + time.strftime('%Y-%m-%d', time.localtime(time.time())) + ".log"


class SchedulerConfig(object):
    # 定时任务
    JOBS = [
        {
            'id': 'clean_csv_files',
            'func': 'app:utils.apsutils.clean_csv_files',
            'trigger': 'interval',
            'days': 1,
            # 'seconds': 20,
        }
    ]
    SCHEDULER_API_ENABLED = True
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 外网ip和端口（如果添加了nginx代理，需要改成nginx的对外端口） # images path # csv path # mysql Docker部署可填宿主机内网ip # logging # 定时任务 # 'seconds': 20,