Esempio n. 1
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());
        }
Esempio n. 2
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());
        }
Esempio n. 3
0
 public LoadThread(RenderLog log, LuxEngine engine, Scene scene)
 {
     m_log    = log;
     m_engine = engine;
     m_scene  = scene;
 }