public void AddLinkForParsing(string URL) { CloudQueue crawlQueue = CloudConfiguration.GetCrawlingQueue(); CloudQueueMessage message = new CloudQueueMessage(URL); crawlQueue.AddMessage(message); }
public void AddSitemap(string URL) { CloudQueue loadQueue = CloudConfiguration.GetLoadingQueue(); CloudQueueMessage message = new CloudQueueMessage(URL); loadQueue.AddMessage(message); }
public AdminStatus(string state, int cpu, int mem) { this.PartitionKey = "Dashboard Status"; this.RowKey = "Row"; State = state; CPUCounter = cpu; MemCounter = mem; NumCrawled = 0; Last10CrawledList = new List <string>(); Last10Crawled = ""; CloudQueue temp = CloudConfiguration.GetCrawlingQueue(); temp.FetchAttributes(); QueueSize = temp.ApproximateMessageCount.ToString(); }
public void AddLinkToResults(string URL, string title, DateTime date) { CloudTable table = CloudConfiguration.GetSiteDataTable(); string[] words = title.Split(null); // split title on whitespace foreach (string s in words) { string keyword = s.ToLower(); URLEntity linkEntry = new URLEntity(URL, keyword, title, date); // Create the TableOperation object that inserts the customer entity. TableOperation insertOperation = TableOperation.Insert(linkEntry); try { // Execute the insert operation. table.Execute(insertOperation); } catch (Exception ex) { Debug.Print(ex.Message); } } }