1、搭建flask框架。
2、整合JPSS,葵花8,GF3,哨兵1,哨兵2,哨兵3,资源2号,环境1号,SNPP等遥感数据解析算法。 3、flask中添加扫描各个卫星扫描任务,定时扫描,数据入库
This commit is contained in:
44
application/settings/__init__.py
Normal file
44
application/settings/__init__.py
Normal file
@ -0,0 +1,44 @@
|
||||
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' # 结束遥感数据归档任务请求地址
|
BIN
application/settings/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
application/settings/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
application/settings/__pycache__/dev.cpython-39.pyc
Normal file
BIN
application/settings/__pycache__/dev.cpython-39.pyc
Normal file
Binary file not shown.
BIN
application/settings/__pycache__/prop.cpython-39.pyc
Normal file
BIN
application/settings/__pycache__/prop.cpython-39.pyc
Normal file
Binary file not shown.
9
application/settings/dev.py
Normal file
9
application/settings/dev.py
Normal file
@ -0,0 +1,9 @@
|
||||
from . import Config
|
||||
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
"""
|
||||
开发模式下的配置
|
||||
"""
|
||||
# 查询时会显示原始SQL语句
|
||||
SQLALCHEMY_ECHO = True
|
6
application/settings/prop.py
Normal file
6
application/settings/prop.py
Normal file
@ -0,0 +1,6 @@
|
||||
from . import Config
|
||||
|
||||
|
||||
class ProductionConfig(Config):
|
||||
"""生产模式下的配置"""
|
||||
DEBUG = False
|
Reference in New Issue
Block a user