The selection of task now takes into account the priority of the
building