Update to Azure diagnostics: rolestatus and get health status
So I would like to know what the开发者_如何转开发 updated disgnostics are for RoleStatus and getHealthStatus() in Azure ?
Thanks 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");
}
See also:
RoleInstanceStatusCheckEventArgs.SetBusy(): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleinstancestatuscheckeventargs.setbusy.aspx
and
RoleEnvironment.RequestRecycle(): http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.requestrecycle.aspx
精彩评论