sassoftware / restaf

A simple framework for building applications with SAS REST APIs, supported with SAS Viya
Apache License 2.0
17 stars 10 forks source link

longpolling-computerun #85

Closed devaKumaraswamy closed 2 years ago

devaKumaraswamy commented 2 years ago

computeRun was not taking advantage of the long polling in compute service. To fix this:


{ newState: 'Completed', timeout: 2}
The timeout is in seconds. 

This fix will improve the performance.
devaKumaraswamy commented 2 years ago

The fix does not handle the case of the job failing before the first state check. The state end point keeps returning 304. To handle this have to remove newState and instead use headers['If-None-Match'] = etag.

devaKumaraswamy commented 2 years ago

still need to allow checkStatus to set a new status value for convenience of post processing