Reputation: 340
I can't find any equivalent in Netsuite for fastcgi_finish_request();
. I want to reply with code 200 right away to a 3rd party server call, but the suitelet/restlet should continue the execution.
the logic
/**
* @NApiVersion 2.1
* @NScriptType Suitelet
*/
define([],
() => {
/**
* Defines the Suitelet script trigger point.
* @param {Object} scriptContext
* @param {ServerRequest} scriptContext.request - Incoming request
* @param {ServerResponse} scriptContext.response - Suitelet response
* @since 2015.2
*/
const onRequest = (scriptContext) => {
/**
* set response code 200 and return the response
* the equivalent of `fastcgi_finish_request` & `session_write_close()` to close the session.
* the 3rd party server should receive the response, but the NS script should continue
*/
log.debug("code executed after 3rd party server received the suitelet response");
}
return { onRequest }
});
Any Thoughts?
thx
Upvotes: 0
Views: 89
Reputation: 15447
For this sort of thing I write the payload to a queue record and trigger processing and do the quick return.
Upvotes: 0