update gateway and worker process loop