所以我想知道Azure中RoleStatus和getHealthStatus()的更新诊断是什么?
谢谢Supraja J
From: http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleinstancestatuscheckeventargs.aspx
public override bool OnStart()
{
RoleEnvironment.StatusCheck += RoleEnvironmentStatusCheck;
return base.OnStart();
}
private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
{
Trace.WriteLine("The status of the role instance: " + e.Status, "Information");
}
参见:
RoleInstanceStatusCheckEventArgs.SetBusy (): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleinstancestatuscheckeventargs.setbusy.aspx
和
RoleEnvironment.RequestRecycle (): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.requestrecycle.aspx