Exemple #1
0
        public override bool OnStart()
        {
            try
            {
                ServicePointManager.DefaultConnectionLimit = 12;

                RoleEnvironment.Changing += roleEnvironmentChanging;

                m_log = new RenderLog("mergerlog");

                m_engine = new LuxEngine(m_log);
                m_engine.Init();

                m_log.Info("storageAccount created");
                m_dispatcherQueues = new Dictionary <int, MessageQueue <DispetcherMessage> >();
                initQueue();
                m_log.Info("Queue initialized");
                initBlob();
                m_log.Info("Blob initialized");
                m_oneBatchInPercents  = 0;
                m_totalRenderTime     = 0;
                m_percentageCompleted = 0;
                m_log.Info("OnStart successfull");
            }
            catch
            {
                Trace.TraceWarning("Method OnStart() of MergerRole is failed.");
                m_log.Error("Method OnStart() of MergerRole is failed.");
                RoleEnvironment.RequestRecycle();
                return(false);
            }
            return(base.OnStart());
        }
Exemple #2
0
        public override bool OnStart()
        {
            try
            {
                ServicePointManager.DefaultConnectionLimit = 12;
                RoleEnvironment.Changing += roleEnvironmentChanging;
                Microsoft.WindowsAzure.CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
                {
                    configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
                });
                // Each render role has own log file
                m_log = new RenderLog("renderlog" + Utils.RoleID().ToString());

                initQueue();
                initBlob();
                initDisk();
                m_log.Info("OnStart successfull");
                m_engine = new LuxEngine(m_log);
                m_engine.Init();
            }
            catch
            {
                m_log.Error("OnStart failed");
                RoleEnvironment.RequestRecycle();
                Trace.TraceWarning("Method OnStart() of WorkerRole is failed.");
                return(false);
            }

            return(base.OnStart());
        }
        public override bool OnStart()
        {
            try
            {
                ServicePointManager.DefaultConnectionLimit = 12;

                // For information on handling configuration changes
                // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
                RoleEnvironment.Changing += roleEnvironmentChanging;
                m_threadsID           = new Dictionary <string, int>();
                m_renderAbortHandlers = new Dictionary <int, List <MessageQueue <RenderMessage> > >();
                m_connectionHandlers  = new Dictionary <string, NetMessageHandler>();
                m_log = new RenderLog("dispatcherlog");

                m_log.Info("storageAccount created");
                initQueue();
                m_log.Info("Queue initialized");
                initBlob();
                m_log.Info("Blob initialized");
                m_log.Info("RolesCnt initialized");
                m_scenesId        = SceneID.Get();
                m_instanceManager = InstanceManager.Get(m_log);
                m_log.Info("OnStart completed");
            }
            catch (Exception ex)
            {
                RoleEnvironment.RequestRecycle();    //request role restart
                System.Diagnostics.Trace.TraceWarning("Method OnStart() of WebRole is failed.");
                m_log.Error("Error when initializing: " + ex.Message);
                return(false);
            }

            return(base.OnStart());
        }
Exemple #4
0
 public LoadThread(RenderLog log, LuxEngine engine, Scene scene)
 {
     m_log    = log;
     m_engine = engine;
     m_scene  = scene;
 }