Devikalalitha
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from flask_cors import cross_origin, CORS
|
|
5 |
import logging
|
6 |
import os
|
7 |
import json
|
|
|
8 |
|
9 |
|
10 |
app = Flask(__name__)
|
@@ -33,6 +34,7 @@ def update_news_in_db():
|
|
33 |
status_json = json.dumps({'status':'failure', 'message':str(e)})
|
34 |
status_code = 500
|
35 |
logger.warning('Exiting update_news_in_db()')
|
|
|
36 |
return Response(status_json, status=status_code, mimetype='application/json')
|
37 |
|
38 |
logger.warning('Exiting application')
|
|
|
5 |
import logging
|
6 |
import os
|
7 |
import json
|
8 |
+
import gc
|
9 |
|
10 |
|
11 |
app = Flask(__name__)
|
|
|
34 |
status_json = json.dumps({'status':'failure', 'message':str(e)})
|
35 |
status_code = 500
|
36 |
logger.warning('Exiting update_news_in_db()')
|
37 |
+
gc.collect()
|
38 |
return Response(status_json, status=status_code, mimetype='application/json')
|
39 |
|
40 |
logger.warning('Exiting application')
|