Open MartijnR opened 2 years ago
curl --user enketorules: -d "server_url=http://localhost:3000&form_id=fails&instance=\
<data><calc1/><meta><instanceID>a</instanceID></meta></data>&instance_id=a&ecid=b" http://localhost:8005/oc/api/v1/instance/headless
baseline: 1,715 | 1,599 | 1,555 ms, after:
I don't think there is scope to improve this for this scenario.
Since record is passed in the API request, I don't think this scenario is realistic.
curl --user enketorules: -d "server_url=http://localhost:3000&form_id=dn-calculate&instance=\
<dn-calculate><a>1</a><meta><instanceID>a</instanceID></meta></dn-calculate>&instance_id=a&ecid=b" http://localhost:8005/oc/api/v1/instance/headless
baseline: 31,152 | 31,107 | 31,150, after: 1,412 | 1,373 | 1,356
This scenario may only be temporary but there will be similar scenarios with an exception that is not properly caught. What is happening in this scenario is that the app waits until the 30 second timeout has passed. Use http://localhost:8005/single/fs/i/uEUZO5H2?ecid=b for development.
If an exception occurs before the form is initalized (e.g. atm for a missing external data file), the response will now be up to 30 seconds faster (usually close to 30 seconds).
@MartijnR - Is there a change for this in the latest master branch?
Oops, it looks like I forgot to push that. It is done now (to master) but for some reason the commit is not yet shown in this thread.
E.g in headless mode, a form that has a calculation that is run upon load and includes a non-existing XPath function.
Or, an instance to be loaded is not available. Or clinical data file is not available.
Return 400?