[英]Azure Batch - Update job priority on CloudJob (.Net)
I have a project in.Net and im trying to update the job priority of azure batch.我在.Net 中有一个项目,我正在尝试更新 azure 批次的作业优先级。
CloudJob job = await batchClient.JobOperations.GetJobAsync(jobId);
if (job != null)
{
job.Priority = jobUpdateRequest.Priority;
job.Commit();
}
when i run that, i got an error 'Operation returned an invalid status code 'Conflict'.当我运行它时,我得到一个错误'操作返回一个无效的状态代码'冲突'。 Any suggestion?有什么建议吗?
Most likely the job is in a state where that property cannot be updated/patched.该工作很可能在 state 中,该属性无法更新/修补。 You will need to disable the job first (and ensure the job is in disabled
state) before updating/patching the property.在更新/修补属性之前,您需要先禁用作业(并确保作业处于disabled
状态)。 Then re-enable the job.然后重新启用作业。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.