In my activity function I am doing this
do {
await timeout(500);
} while (await getStatus() === false);
where,
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
getStatus()
is a function that does a get
request to see if process in other service is complete or not and returns true
or false
based on this.
I need my activity function to wait before the process in other service is complete. But activity function execution by default is limited to 5 minutes.
my getStatus()
can take more than 2-3 hours or more based on different scenarios to return true
.
What can I do here? Any advice?