I have an HTTPS callable function, that it does some logic, returns a result back, but in some cases I want to do some background work that might take a while, without waiting. At the moment it works, but I don't know if this is how it is supposed to be. Example:
exports.example = functions.https.onCall((data, context) => {
// some logic //
if(check(data,context))
triggerSomeAsyncActions();
return 200;
});
In the example above, it is important for me to return without waiting for triggerSomeAsyncActions()
.