+++ DB/postgresql-42.7.3.jar
Binary file is not shown |
--- Hourly_db_schedular.py
+++ Hourly_db_schedular.py
... | ... | @@ -66,6 +66,7 @@ |
66 | 66 |
INSERT INTO flooding_anals_event_data_hr (clct_dt, eqpmn_id, flooding_cnt) |
67 | 67 |
VALUES (%s, %s, %s); |
68 | 68 |
""" |
69 |
+ |
|
69 | 70 |
for index, row in df.iterrows(): |
70 | 71 |
cursor.execute(insert_sql, (previous_hour, row['eqpmn_id'], row['flooding_cnt'])) |
71 | 72 |
conn.commit() |
... | ... | @@ -80,5 +81,6 @@ |
80 | 81 |
return "Flooding analysis service running." |
81 | 82 |
|
82 | 83 |
if __name__ == '__main__': |
84 |
+ fetch_and_update() |
|
83 | 85 |
app.run(debug=True, use_reloader=False) |
84 | 86 |
|
--- config_files/MAIN_DB_ENDPOINT.json
+++ config_files/MAIN_DB_ENDPOINT.json
... | ... | @@ -1,7 +1,7 @@ |
1 | 1 |
{ |
2 |
- "address" : "210.180.118.83", |
|
3 |
- "port" : "5423", |
|
4 |
- "id" : "takensoft", |
|
5 |
- "password" : "tts96314728!@", |
|
6 |
- "schema_name" : "ai_camera_v0_1", |
|
2 |
+ "host" : "210.180.118.83", |
|
3 |
+ "port" : "5432", |
|
4 |
+ "dbname" : "ai_camera_management_system", |
|
5 |
+ "user" : "takensoft", |
|
6 |
+ "password" : "tts96314728!@" |
|
7 | 7 |
}(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?