[backend] only calculate worker/buildcode state every 20 seconds