private static void Main(string[] args) { //-c crl_html -t 1 Console.WriteLine(@" -c push_download_html -dm adayroi.com -c worker_parse_product -dm adayroi.com #Worker parse product properties -c worker_download_html -dm adayroi.com #Worker donwload html for adayroi.com -c worker_map_product -dm -c updcatid -c FattenData "); string str = string.Join(" ", args); // str = "-c wprpd -dm adayroi.com"; if (string.IsNullOrEmpty(str)) { str = Console.ReadLine(); } Parameter pt = new Parameter(str); if (pt.cmd == "push_download_html") { ServiceRun.PushJobDownload(pt.domains); } else if (pt.cmd == "worker_parse_product") { ServiceRun.RunWorkerParse(pt.domains); } else if (pt.cmd == "worker_download_html") { ServiceRun.DownLoadHtml(pt.domains); } else if (pt.cmd == "re_push_parse_from_cas") { ServiceCrl.PushParseFromNoSql(pt.domains); } else if (pt.cmd == "updcatid") { MongoAdapter m = MongoAdapter.Instance(); m.UpdateCategoryId(); } else if (pt.cmd == "FattenData") { MongoAdapter m = MongoAdapter.Instance(); m.FattenData(); } else if (pt.cmd == "worker_map_product") { ServiceRun.MapProductToSql(pt.domains); } Thread.Sleep(1000000); }
private static void Main(string[] args) { QT.Entities.Server.ConnectionString = ConfigurationManager.AppSettings["ConnectionProduct"]; //-c crl_html -t 1 Console.WriteLine(@" -c psdl -dm adayroi.com #Push Link To Download Html AS -c wprpd -dm adayroi.com #Worker parse product properties -c wdl -dm adayroi.com #Worker donwload html for adayroi.com -c updcatid -c FattenData "); string str = string.Join(" ", args); // str = "-c wprpd -dm adayroi.com"; if (string.IsNullOrEmpty(str)) { str = Console.ReadLine(); } Parameter pt = new Parameter(str); if (pt.cmd == "psdl") { ServiceCrl.PushDownloadHtml(pt.domains); } else if (pt.cmd == "wprpd") { ServiceCrl.RunWorkerParse(pt.domains); } else if (pt.cmd == "wdl") { ServiceCrl.RunDownloadHtml(pt.domains); } else if (pt.cmd == "re_push_parse_from_cas") { ServiceCrl.PushParseFromNoSql(pt.domains); } else if (pt.cmd == "updcatid") { MongoAdapter m = MongoAdapter.Instance(); m.UpdateCategoryId(); } else if (pt.cmd == "FattenData") { MongoAdapter m = MongoAdapter.Instance(); m.FattenData(); } Thread.Sleep(1000000); }