The function claimAvailableTasks() is doing the real work, but we "wrap it" in an observable, as that's the current contract between task claimers and their callers.
We think we can probably remove this, to make things a little less confusing, and have it return the results directly. This is part of a general theme of removing the extensive usage of RxJs within task manager where it's not actually needed.
As part of implement task claiming strategy mget #180485, you can see some fairly artificial code constructing an observable to return the results back to the caller:
The function
claimAvailableTasks()
is doing the real work, but we "wrap it" in an observable, as that's the current contract between task claimers and their callers.We think we can probably remove this, to make things a little less confusing, and have it return the results directly. This is part of a general theme of removing the extensive usage of RxJs within task manager where it's not actually needed.