|
@@ -8,25 +8,6 @@ from common.database_dml import get_data_from_mongo, insert_data_into_mongo
|
|
|
|
|
|
app = Flask('post_processing——service')
|
|
app = Flask('post_processing——service')
|
|
|
|
|
|
-"""
|
|
|
|
-id = "${id}"
|
|
|
|
-
|
|
|
|
-cap = ${cap}
|
|
|
|
-
|
|
|
|
-参数
|
|
|
|
-{
|
|
|
|
- 'mongodb_database': 'hzh_ftp',
|
|
|
|
- 'mongodb_read_table': f'{id}_PRED',
|
|
|
|
- 'mongodb_write_table': f'{id}_PRED',
|
|
|
|
- 'col_time': "dateTime",
|
|
|
|
- 'smooth_window': 3
|
|
|
|
- 'plant_type': 'solar',
|
|
|
|
- 'mongodb_nwp_table': f'{id}_NWP_D1'
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-"""
|
|
|
|
-
|
|
|
|
-
|
|
|
|
def get_data(args):
|
|
def get_data(args):
|
|
df = get_data_from_mongo(args)
|
|
df = get_data_from_mongo(args)
|
|
col_time = args['col_time']
|
|
col_time = args['col_time']
|
|
@@ -96,7 +77,6 @@ def data_join():
|
|
success = 1
|
|
success = 1
|
|
except Exception as e:
|
|
except Exception as e:
|
|
my_exception = traceback.format_exc()
|
|
my_exception = traceback.format_exc()
|
|
- print(my_exception)
|
|
|
|
my_exception.replace("\n", "\t")
|
|
my_exception.replace("\n", "\t")
|
|
result['msg'] = my_exception
|
|
result['msg'] = my_exception
|
|
end_time = time.time()
|
|
end_time = time.time()
|