Fix potential race condition in the deployment

@MatthiasBrantner here we use the job id to not delete a project while it's being deployed somewhere else and vice versa.