Skip to content

Commit

Permalink
Observe rx observables in IO
Browse files Browse the repository at this point in the history
  • Loading branch information
omurovch committed Nov 16, 2023
1 parent 2bd239f commit a9a273f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class BlockchairApiSyncer(
override fun sync() {
scanSingle()
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe({}, {
handleError(it)
}).let {
Expand All @@ -48,6 +49,7 @@ class BlockchairApiSyncer(
override fun syncLastBlock() {
syncLastBlockSingle()
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe({}, {
handleError(it)
}).let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ApiSyncer(
override fun sync() {
val disposable = blockHashDiscovery.discoverBlockHashes()
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.subscribe(
{ (publicKeys, blockHashes) ->
val sortedUniqueBlockHashes = blockHashes.distinctBy { it.height }.sortedBy { it.height }
Expand Down

0 comments on commit a9a273f

Please sign in to comment.