Querying expected delivery in rake task