'Akka, chaining Futures
I have three methods which return future, how do I properly chain them so that output from first one is passed to the second and second's return to third and finally send them all of the above data to final future. I am not sure this is the correct way to approach this problem.
Source
.fromFuture(someFuture)
.mapAsync(1)(modelData => queryModelData(modelQuery))
.mapAsync(1)(modelId => findModelId(modelData))
.mapAsync(1)(jobData => queryJobData(jobQuery))
.mapAsync(1)(status => setModelStatus(modelData,modelId,jobData))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
