Last active
May 7, 2020 10:02
-
-
Save ghostbuster91/59dd31f5819fd24310475b273b24da63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable | |
.intervalWithFixedDelay(config.interval) | |
.mapEval( _ => repository.findAllWaitingOrderedBySerialIdAsc(config.maxBatchSize)) | |
.distinctUntilChanged | |
.scan(List.empty[Withdrawal]) { (oldSet, newSet) => | |
newSet.takeWhile(w => !oldSet.contains(w)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment