예제 #1
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (roleIsBusy)
     {
         e.SetBusy();
     }
 }
예제 #2
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (this.busy)
     {
         e.SetBusy();
     }
     statusCheckWaitHandle.Set();
 }
예제 #3
0
 public void SetBusy(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     // set the instance as busy
     if (Switch)
     {
         e.SetBusy();
     }
 }
 void RoleEnvironment_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     System.Diagnostics.Trace.WriteLine("StatusCheck called");
     if (this._updater.IsUpdating)
     {
         System.Diagnostics.Trace.WriteLine("Setting Busy state as we are updating");
         e.SetBusy();
     }
 }
        /// <summary>
        /// Handle Azure status check events to set the role as busy if the lock file is missing.
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event arguments</param>
        static void Chef_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(ClientService.statusCheckFilePath) ||
                System.IO.File.Exists(ClientService.statusCheckFilePath))
            {
                return;
            }

            e.SetBusy();
        }
        /// <summary>
        /// Handle Azure status check events to set the role as busy if the lock file is missing.
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event arguments</param>
        static void Chef_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(ClientService.statusCheckFilePath) || 
                System.IO.File.Exists(ClientService.statusCheckFilePath))
            {
                return;
            }

            e.SetBusy();
        }
예제 #7
0
        void RoleEnvironment_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
        {
            if (AzureLeaderElectionProvider.AmITheLeader)
            {
                return;
            }
            bool isBusy = false;

            foreach (var tenants in TenantStatuses)
            {
                isBusy = isBusy || GetTenantStatus(tenants.Key) != TenantStatus.Started;
            }
            if (isBusy)
            {
                e.SetBusy();
            }
        }
예제 #8
0
파일: WebRole.cs 프로젝트: akoltz/ggcbnet
 void RoleEnvironment_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (!isReady)
     {
         e.SetBusy();
     }
 }
예제 #9
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (roleIsBusy)
         e.SetBusy();
 }
예제 #10
0
 /// <summary>
 /// STATUS CHECK : Control the avaibility of this instance for the WindowsAzure load balancer
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void RoleEnvironment_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (this.busy)
     {
         e.SetBusy();
         Trace.TraceWarning("StatusCheck - The status of the role instance has been set to busy - Instance is unsubscribed from the Azure load balancer");
     }
 }