addisclinic/mobile-dispatch-server

Random Failure during Binary data upload

Opened this issue · 1 comments

I/MDSInterface: Trying to upload 640000 bytes for SPFmrwXsnWBCoQKcfOTRWh:patientPhoto.
I/MDSInterface: endpoint: https://54.165.162.124/mds/json/binarychunk/submit/
D/MDSInterface: postResponses got response code 200
D/MDSInterface: Received from MDS:{"status": "SUCCESS", "data": "Successfully saved binary chunk: Encounter: SPFmrwXsnWBCoQKcfOTRWh is WAITING on  [u'5']"}
I/MDSInterface: packet rate = (current) 348.9640130861505, (base) 239.02894491129788
I/MDSInterface: Shifting packet size *2 =1280000
I/MDSInterface: Trying to upload 241691 bytes for SPFmrwXsnWBCoQKcfOTRWh:patientPhoto.
I/MDSInterface: endpoint: https://54.165.162.124/mds/json/binarychunk/submit/
D/MDSInterface: postResponses got response code 200
D/MDSInterface: Received from MDS:{"status": "FAILURE", "data": "Failed to save the binary chunk: SavedProcedure -> 5, BinaryResource -> SPFmrwXsnWBCoQKcfOTRWh: <class 'urllib2.HTTPError'> HTTP Error 404: Not Found"}
I/MDSInterface: Shifting packet size /2 =640000
I/MDSInterface: Trying to upload 241691 bytes for SPFmrwXsnWBCoQKcfOTRWh:patientPhoto.
I/MDSInterface: endpoint: https://54.165.162.124/mds/json/binarychunk/submit/
D/MDSInterface: postResponses got response code 200
D/MDSInterface: Received from MDS:{"status": "SUCCESS", "data": "Successfully saved binary chunk: Uploading"}

Possibly because of race-conditions (I know - python doesn't thread but I'm referring to DB itself which isn't really configured in django as it should be so that might be where the error lies). Could also be an out of date urllib2 module or out of sync django version. Either way - we'll circle back to this once the notifications endpoint is up and running.