已触发的Azure Web作业进入异常终止状态

问题描述 投票:0回答:1

我有2个Azure Web作业。一种被触发,另一种是连续的。只要Web作业的服务器配置或应用程序配置发生任何更改,触发的Web作业就会进入中止状态。因为发生了更改,因此需要重新启动应用程序,并且由于某种原因它无法正确重新启动。需要帮助

azure azure-devops azure-webjobs
1个回答
0
投票

这里是设置状态的源代码:

if (triggeredJobStatus.Status == JobStatus.Running)
            {
                if (isLatest)
                {
                    // If it is the latest run, make sure it's actually running
                    string triggeredJobDataPath = Path.Combine(JobsDataPath, jobName);
                    LockFile triggeredJobRunLockFile = TriggeredJobRunner.BuildTriggeredJobRunnerLockFile(triggeredJobDataPath, TraceFactory);
                    if (!triggeredJobRunLockFile.IsHeld)
                    {
                        triggeredJobStatus.Status = JobStatus.Aborted;
                    }
                }
                else
                {
                    // If it's not latest run it cannot be running
                    triggeredJobStatus.Status = JobStatus.Aborted;
                }
            }

此外,您是否还检查了WebJob的日志及其所有触发方法?请通读日志,检查是否有任何异常情况。

如果作业状态文件中的作业状态显示为正在运行,但实际上未运行,则作业状态显示为已终止。

其他参考:

https://github.com/MicrosoftDocs/azure-docs/issues/19686

希望有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.