Kudu.Core.Deployment.DeploymentManager.VerifyDeployment C# (CSharp) Method

VerifyDeployment() private method

Ensure the deployment is in a valid state.
private VerifyDeployment ( string id, bool isDeploying ) : IDeploymentStatusFile
id string
isDeploying bool
return IDeploymentStatusFile
        private IDeploymentStatusFile VerifyDeployment(string id, bool isDeploying)
        {
            IDeploymentStatusFile statusFile = _status.Open(id);

            if (statusFile == null)
            {
                return null;
            }

            if (statusFile.Complete)
            {
                return statusFile;
            }

            // There's an incomplete deployment, yet nothing is going on, mark this deployment as failed
            // since it probably means something died
            if (!isDeploying)
            {
                ILogger logger = GetLogger(id);
                logger.LogUnexpectedError();

                MarkStatusComplete(statusFile, success: false);
            }

            return statusFile;
        }