Exemplo n.º 1
0
        public void WaitForInstancesStatus(IEnumerable <string> instanceIds, Ec2InstanceState state)
        {
            Thread.Sleep(15000);
            var instances = GetInstances(instanceIds).ToList();
            var states    = instances.Select(y => y.State);

            if (states.Any(x => x.Code != (int)state))
            {
                Logger.Info("One or more instances is not in state {0}, waiting 15 seconds...", state.ToString());
                WaitForInstancesStatus(instanceIds, state);
            }
        }
Exemplo n.º 2
0
        public void WaitForInstancesStatus(IEnumerable<string> instanceIds, Ec2InstanceState state)
        {
            var instances = GetInstances(instanceIds).ToList();
            var states = instances.Select(y => y.State);

            if (states.Any(x => x.Code != (int)state))
            {
                Logger.Info("One or more instances is not in state {0}, waiting 15 seconds...", state.ToString());
                Thread.Sleep(15000);
                WaitForInstancesStatus(instanceIds, state);
            }
        }