scheduler: improve pull queries