[sgen] Make sure workers process jobs only if they are running (#4974)