Ejemplo n.º 1
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (roleIsBusy)
     {
         e.SetBusy();
     }
 }
Ejemplo n.º 2
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (this.busy)
     {
         e.SetBusy();
     }
     statusCheckWaitHandle.Set();
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 5
0
        /// <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();
        }
Ejemplo n.º 6
0
        /// <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();
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 8
0
 void RoleEnvironment_StatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (!isReady)
     {
         e.SetBusy();
     }
 }
Ejemplo n.º 9
0
 private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
 {
     if (roleIsBusy)
         e.SetBusy();
 }
Ejemplo n.º 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");
     }
 }