.
This commit is contained in:
@@ -448,7 +448,7 @@ namespace URLNotesGrabberCORE
|
||||
{
|
||||
int APICount = DataAccess.GetAPICount();
|
||||
Console.WriteLine($"{post.Item1}\t{post.Item2}\t{DateTime.Now}\t{APICount}");
|
||||
Thread.Sleep(3000);
|
||||
//Thread.Sleep(3000);
|
||||
|
||||
var allNotes = new List<dynamic>();
|
||||
int page = 1;
|
||||
@@ -478,10 +478,10 @@ namespace URLNotesGrabberCORE
|
||||
}
|
||||
if (response.statusCode == "TooManyRequests")
|
||||
{
|
||||
for (int s = 0; s <= response.retryInSeconds; s += 15)
|
||||
for (int s = 0; s <= response.retryInSeconds; s += 60)
|
||||
{
|
||||
Console.WriteLine("Sleeping for {0} more seconds, until {1}", response.retryInSeconds - s, DateTime.Now.AddSeconds(response.retryInSeconds - s).ToShortTimeString());
|
||||
Thread.Sleep(15000);
|
||||
Thread.Sleep(60000);
|
||||
}
|
||||
return response.statusCode;
|
||||
}
|
||||
@@ -589,6 +589,12 @@ namespace URLNotesGrabberCORE
|
||||
else
|
||||
{
|
||||
Console.WriteLine("GrabNotes Result: " + status);
|
||||
|
||||
//if not success, mark as not found to avoid repeated attempts, unless it was a rate limit issue
|
||||
if (status != "RateLimitExceeded")
|
||||
{
|
||||
DataAccess.UpdatePostMarkNotFound(post.Item1, post.Item2);
|
||||
}
|
||||
}
|
||||
|
||||
// Re-fetch the updated list after processing the current post
|
||||
|
||||
Reference in New Issue
Block a user