Esempio n. 1
0
        public static List <EngineCustomStatus> GetEnginesStatus(List <CCEngine> lEngineConfig)
        {
            List <EngineCustomStatus> lEngineCustomStatus = new List <EngineCustomStatus>();

            foreach (CCEngine engine in lEngineConfig)
            {
                EngineCustomStatus ECS = Toolbox.GetEngineStatus(engine.FullName);
                if (ECS == null || !ECS.IsAlive)
                {
                    Sys.LogError($"Can't connect to Engine [{engine.FullName}]");
                    return(null);
                }
                lEngineCustomStatus.Add(ECS);
            }
            return(lEngineCustomStatus);
        }
Esempio n. 2
0
        //return engine status
        public static EngineCustomStatus GetEngineStatus(string engineName)
        {
            //try to open connexion to the engine
            EngineClient client = EngineClientFromPool(engineName);

            if (client == null)
            {
                return(null);
            }

            //check engine is alive
            EngineCustomStatus ECS = new EngineCustomStatus(client);

            //return client to pool
            EngineClientToPool(client);
            return(ECS);
        }