Open cbizon opened 1 year ago
I think to be TRAPI compliant we want the endpoints to be /query and /asyncquery
Reading the code, most of the functions are 'async' with 'await' calls in the body, eg: https://github.com/TranslatorSRI/NodeNormalization/blob/2f08a2d88d23dad5f54f3f763bda5c0dbaf51dff/node_normalizer/server.py#L80
In trying to read between the lines...you are asking me to:
Is this accurate?
/asyncquery should take a trapi message and immediately return a 200. Part of the input payload to /asyncquery should be a callback_url. When the job is complete, the response should be posted to the callback_url.
Here's the documentation for AsyncQuery: https://github.com/NCATSTranslator/ReasonerAPI/blob/91338a117354385d58ce0b904fb70a095fc501dd/docs/reference.md#asyncquery-
I think this has been implemented, but the testing code for this is probably in https://github.com/TranslatorSRI/NodeNormalization/pull/157, which needs a lot of work before we can merge it. Let's leave it open until it's fully fixed.
Right now the TRAPI endpoint is only sync, but it needs an async version so that wf runner can use it.
Also, let's change the name from /response which is a bad name...