Esempio n. 1
0
        public void Start(string baseUrl)
        {
            baseUrl = IPHelper.FixLocalUrl(baseUrl);

            app = WebApp.Start <Startup>("http://" + baseUrl);

            Node = new StandAloneNode(baseUrl);

            Node.Start();

            FeedScheduler.Start(baseUrl, "", null);
            FeedExtractScheduler.Start(baseUrl);
        }
Esempio n. 2
0
        protected override void OnStartup()
        {
            base.CreateLiveNode("/live_nodes/feed/" + BaseUrl, null);

            var stat = zooKeeper.Exists("/config/feed/" + BaseUrl, false);

            if (stat == null)
            {
                var d = new NodeConfig()
                {
                    Name    = BaseUrl,
                    baseUrl = BaseUrl,
                    Proxy   = ProxyUrl
                };
                zooKeeper.Create("/config/feed/" + BaseUrl, JsonConvert.SerializeObject(d).GetBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.Persistent);
            }

            FeedScheduler.Start(BaseUrl, ProxyUrl, this);
            FeedExtractScheduler.Start(BaseUrl);
        }