public string UpdateWebSiteData(string Id, string Url) { string ret = string.Empty; try { try { Api.WebSiteReview.WebSiteReview objWebSiteReview = new Api.WebSiteReview.WebSiteReview(); objWebSiteReview.Timeout = 5000; ret = objWebSiteReview.UpdateWebSiteData(Id, Url); //ret = ApiObjTwitter.getTwitterDataWithPagination(itemTwt.UserId.ToString(), itemTwt.TwitterUserId); } catch (Exception ex) { Console.WriteLine(ex.Message); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); Console.WriteLine(ex.Message); } return(ret); }
public string UpdateWebSiteData(string Id, string Url) { string ret = string.Empty; try { try { Api.WebSiteReview.WebSiteReview objWebSiteReview = new Api.WebSiteReview.WebSiteReview(); objWebSiteReview.Timeout = 5000; ret = objWebSiteReview.UpdateWebSiteData(Id,Url); //ret = ApiObjTwitter.getTwitterDataWithPagination(itemTwt.UserId.ToString(), itemTwt.TwitterUserId); } catch (Exception ex) { Console.WriteLine(ex.Message); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); Console.WriteLine(ex.Message); } return ret; }
private static void RunDataService(string profiletype) { while (true) { try { Api.WebSiteReview.WebSiteReview objWebSiteReview = new Api.WebSiteReview.WebSiteReview(); List<Domain.Myfashion.Domain.websitereviewdata> _websitereviewdata = new List<Domain.Myfashion.Domain.websitereviewdata>(); string getallwebsiteurl = objWebSiteReview.GetAllWebSite(); _websitereviewdata = (List<Domain.Myfashion.Domain.websitereviewdata>)new JavaScriptSerializer().Deserialize(getallwebsiteurl, typeof(List<Domain.Myfashion.Domain.websitereviewdata>)); //ThreadPool.SetMaxThreads(20, 4); if (_websitereviewdata != null) { if (_websitereviewdata.Count != 0) { foreach (var item in _websitereviewdata) { try { try { //ThreadPool.SetMaxThreads(20, 4); RunDataServiceInThreads(item); } catch (Exception ex) { Console.WriteLine(ex.Message); } } catch (Exception ex) { Console.WriteLine(ex.Message); } } } else { Console.WriteLine("No active record in Database"); } } else { Console.WriteLine("No active record in Database"); } Thread.Sleep(5 * 60 * 1000); } catch (Exception ex) { Console.WriteLine(ex.Message); } } }
private static void RunDataService(string profiletype) { while (true) { try { Api.WebSiteReview.WebSiteReview objWebSiteReview = new Api.WebSiteReview.WebSiteReview(); List <Domain.Myfashion.Domain.websitereviewdata> _websitereviewdata = new List <Domain.Myfashion.Domain.websitereviewdata>(); string getallwebsiteurl = objWebSiteReview.GetAllWebSite(); _websitereviewdata = (List <Domain.Myfashion.Domain.websitereviewdata>) new JavaScriptSerializer().Deserialize(getallwebsiteurl, typeof(List <Domain.Myfashion.Domain.websitereviewdata>)); //ThreadPool.SetMaxThreads(20, 4); if (_websitereviewdata != null) { if (_websitereviewdata.Count != 0) { foreach (var item in _websitereviewdata) { try { try { //ThreadPool.SetMaxThreads(20, 4); RunDataServiceInThreads(item); } catch (Exception ex) { Console.WriteLine(ex.Message); } } catch (Exception ex) { Console.WriteLine(ex.Message); } } } else { Console.WriteLine("No active record in Database"); } } else { Console.WriteLine("No active record in Database"); } Thread.Sleep(5 * 60 * 1000); } catch (Exception ex) { Console.WriteLine(ex.Message); } } }