From 9cbdddf33ef46261557c0873211feff0347fb2cd Mon Sep 17 00:00:00 2001 From: Greg Edwards Date: Sat, 17 May 2014 02:56:15 -0400 Subject: [PATCH] Adjusted idle times. --- bvCrawler4/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bvCrawler4/Program.cs b/bvCrawler4/Program.cs index 200e64b1..7305ac7c 100644 --- a/bvCrawler4/Program.cs +++ b/bvCrawler4/Program.cs @@ -56,7 +56,7 @@ namespace bvCrawler4 { try { - if (last_top30 < DateTime.Now.AddMinutes(-30)) + if (last_top30 < DateTime.Now.AddMinutes(-60)) { last_top30 = DateTime.Now; QueueTop30(pid); @@ -322,6 +322,13 @@ namespace bvCrawler4 int count = data.Length / 240; Console.WriteLine("{0} results found.", count); + if (count == 0) + { + // Nothing found. Sleep as to not spam the server with lots of empty searches + Thread.Sleep(1000 * 30); + return; + } + // 12 bytes of header plus 240 bytes per search result. using (MySqlConnection db = CreateConnection()) {