[lib] change exit when a job is finished during deployment