def _write_job_status(job_execution, job_info): update = {"info": job_info} if job_info['status'] in edp.JOB_STATUSES_TERMINATED: update['end_time'] = datetime.datetime.now() job_configs = p.delete_proxy_user_for_job_execution(job_execution) if job_configs: update['job_configs'] = job_configs return conductor.job_execution_update(context.ctx(), job_execution, update)
def _write_job_status(job_execution, job_info): update = {"info": job_info} if job_info["status"] in edp.JOB_STATUSES_TERMINATED: update["end_time"] = datetime.datetime.now() job_configs = p.delete_proxy_user_for_job_execution(job_execution) if job_configs: update["job_configs"] = job_configs return conductor.job_execution_update(context.ctx(), job_execution, update)