something about this pseudocode  may be a stupid guess class rollingupdate def init self self last update time update time self templates templates self current batch number current batch number self batch count batch count def handle update  generate needed templates ru rollingupdate update time  templates  current batch number  batch count return ru def check update complete self  rol upd if time now rol upd last update time self properties self pause time  and ru current batch namber self batch count self update with template ru templates batch count ru batch count ru last update time time now return false return true