File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -60,20 +60,19 @@ def main():
60
60
if app .config .get ('AUTHZ_ON' ) is not None :
61
61
es .authorization_enabled = app .config ['AUTHZ_ON' ]
62
62
63
- with app .test_request_context ():
64
- try :
65
- annotation .Annotation .create_all ()
66
- document .Document .create_all ()
67
- except elasticsearch .exceptions .RequestError as e :
68
- if e .error .startswith ('MergeMappingException' ):
69
- date = time .strftime ('%Y-%m-%d' )
70
- log .fatal ("Elasticsearch index mapping is incorrect! Please "
71
- "reindex it. You can use reindex.py for this, e.g. "
72
- "python reindex.py --host {0} {1} {1}-{2}" .format (
73
- es .host ,
74
- es .index ,
75
- date ))
76
- raise
63
+ try :
64
+ annotation .Annotation .create_all ()
65
+ document .Document .create_all ()
66
+ except elasticsearch .exceptions .RequestError as e :
67
+ if e .error .startswith ('MergeMappingException' ):
68
+ date = time .strftime ('%Y-%m-%d' )
69
+ log .fatal ("Elasticsearch index mapping is incorrect! Please "
70
+ "reindex it. You can use reindex.py for this, e.g. "
71
+ "python reindex.py --host {0} {1} {1}-{2}" .format (
72
+ es .host ,
73
+ es .index ,
74
+ date ))
75
+ raise
77
76
78
77
@app .before_request
79
78
def before_request ():
You can’t perform that action at this time.
0 commit comments