in that way, the activity does not have to be suspended and it can call a suspend function (updateSessionToDbForBulk). in case of parallel, I call Kotlin’s “async” within the “runBlocking”.
// Download all files in parallel.
for (String sourceFilename : args.getSourceFilenames()) {
Promise<String> localName =
Async.function(activities::download, args.getSourceBucketName(), sourceFilename);
localNamePromises.add(localName);
}
my questions are:
are the downloads of the files really parallel, or only concurrent?
if I’d like to limit the number of threads opened by Async.function, how would you suggest to do that?
in the documentation you say:
“Do not use any mutable global variables in your Workflow implementations. This will assure that multiple Workflow instances are fully isolated”
what do you mean by “global variables”. can’t I use a list\map as a workflow variable? in this example moneybatch we can see such mutable (Set) collection
if some workflow has default execution timeout (which is infinite), and the pod on which it’s running on crashes, will it be retried? if yes - how and when? if not - should I set the timeout to some finite time?