Open kevinkle opened 7 years ago
eg. so if an older ver of the frontend sends a post w/o the required keys, it doesnt fail. ex:
webserver_1 | [pid: 18|app: 0|req: 1/1] 192.168.5.18 () {50 vars in 789 bytes} [Sun Nov 5 16:18:13 2017] OPTIONS /api/v0/upload => generated 0 bytes in 7 msecs (HTTP/1.1 200) 6 headers in 245 bytes (0 switches on core 0) webserver_1 | 192.168.5.18 - - [05/Nov/2017:16:18:13 +0000] "OPTIONS /api/v0/upload HTTP/1.1" 200 0 "http://192.168.5.19:8090/subtyping" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-" webserver_1 | 2017/11/05 16:18:13 [warn] 12#12: *1 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: 192.168.5.18, server: , request: "POST /api/v0/upload HTTP/1.1", host: "192.168.5.19:8000", referrer: "http://192.168.5.19:8090/subtyping" webserver_1 | [<FileStorage: u'ESC_AA7854AA_AS.fasta' ('application/octet-stream')>] webserver_1 | upload(): about to enqueue files webserver_1 | Uploaded File Saved at /datastore/2017-11-05-16-18-17-627480-ESC_AA7854AA_AS.fasta webserver_1 | [2017-11-05 16:18:17,663] ERROR in app: Exception on /api/v0/upload [POST] webserver_1 | Traceback (most recent call last): webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app webserver_1 | response = self.full_dispatch_request() webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request webserver_1 | rv = self.handle_user_exception(e) webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function webserver_1 | return cors_after_request(app.make_response(f(*args, **kwargs))) webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception webserver_1 | reraise(exc_type, exc_value, tb) webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request webserver_1 | rv = self.dispatch_request() webserver_1 | File "/opt/conda/envs/backend/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request webserver_1 | return self.view_functions[rule.endpoint](**req.view_args) webserver_1 | File "./routes/ra_posts.py", line 244, in upload webserver_1 | {'i': filename, 'pi':options['pi'], 'options':options}) webserver_1 | File "./modules/spfy.py", line 268, in spfy webserver_1 | jobs_dict = blob_savvy(args_dict) webserver_1 | File "./modules/spfy.py", line 255, in blob_savvy webserver_1 | d.update(blob_savvy_enqueue(args_dict)) webserver_1 | File "./modules/spfy.py", line 182, in blob_savvy_enqueue webserver_1 | if single_dict['options']['stx1']: webserver_1 | KeyError: 'stx1' webserver_1 | [pid: 17|app: 0|req: 1/2] 192.168.5.18 () {52 vars in 968 bytes} [Sun Nov 5 16:18:17 2017] POST /api/v0/upload => generated 291 bytes in 81 msecs (HTTP/1.1 500) 4 headers in 153 bytes (19 switches on core 0) webserver_1 | 192.168.5.18 - - [05/Nov/2017:16:18:17 +0000] "POST /api/v0/upload HTTP/1.1" 500 291 "http://192.168.5.19:8090/subtyping" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "-"
eg. so if an older ver of the frontend sends a post w/o the required keys, it doesnt fail. ex: