dms-client/application/settings/__init__.py
XinYi Song c5481ead05 1、搭建flask框架。
2、整合JPSS,葵花8,GF3,哨兵1,哨兵2,哨兵3,资源2号,环境1号,SNPP等遥感数据解析算法。
3、flask中添加扫描各个卫星扫描任务,定时扫描,数据入库
2021-12-01 14:27:49 +08:00

45 lines
2.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from redis import StrictRedis
# 全局通用配置类
class Config(object):
"""项目配置核心类"""
# 调试模式
DEBUG = True
# todo 配置日志
LOG_LEVEL = "DEBUG"
# mysql数据库配置信息(指定字符集?charset=utf8)
# 数据库连接格式
'SQLALCHEMY_DATABASE_URI ="数据库类型://用户名:密码@ip:port:库名?指定字符集编码"'
# SQLALCHEMY_DATABASE_URI = "postgresql://postgres:123456@192.168.2.139:5432/students?charset=utf8"
# # 动态追踪修改设置,如未设置只会提示警告
# SQLALCHEMY_TRACK_MODIFICATIONS = False
# # 查询时会显示原始SQL语句
# SQLALCHEMY_ECHO = False
#
# # 配置redis
# # 项目上线以后这个地址就会被替换成真实IP地址mysql也是
# CACHE_TYPE = 'redis'
# CACHE_REDIS_HOST = 'localhost'
# CACHE_REDIS_PORT = 6379
# CACHE_REDIS_DB = '8'
# CACHE_REDIS_PASSWORD = 'sdust2020'
#
# # 设置session 秘钥
# # 可以通过 base64.b64encode(os.urandom(48)) 来生成一个指定长度的随机字符串
# SECRET_KEY = "CF3tEA1J3hRyIOw3PWE3ZE9+hLOcUDq6acX/mABsEMTXNjRDm5YldRLIXazQviwP"
#
# # flask_session的配置信息
# SESSION_TYPE = 'redis' # 指定session保存到redis中
# SESSION_USE_SIGNER = True # 让 cookie 中的 session_id 被加密签名处理
# SESSION_REDIS = StrictRedis(host=CACHE_REDIS_HOST, port=CACHE_REDIS_PORT) # 使用 redis 的实例
# PERMANENT_SESSION_LIFETIME = 24 * 60 * 60 # session 的有效期,单位是秒
XML_PATH = 'C:/Users/HP/Desktop/Number tube/test' # xml存储路径
THUMBNAIL_PATH = 'C:/Users/HP/Desktop/Number tube/test' # 拇指图存储路径
DFS_UPLOAD_URL = 'http://192.168.2.9:4096/group1/upload' # 文件服务器请求路径
RESING_DATA_URL = 'http://192.168.2.9:8820/api/remote-sensing-data/add' # 入库遥感数据请求地址
DATA_TASK_URL = 'http://192.168.2.9:8820/api/data-storage-task-record/add' # 添加遥感数据归档任务请求地址
DATA_END_TASK_URL = 'http://192.168.2.9:8820/api/data-storage-task-record/end' # 结束遥感数据归档任务请求地址