Skip to content

Commit 2513821

Browse files
committed
fix bug
1 parent 75d4e04 commit 2513821

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

OculusDB/ScrapingMaster/ScrapingManaging.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,16 @@ public static ScrapingProcessedResult ProcessTaskResult(ScrapingNodeTaskResult t
138138
processingRn[scrapingNodeAuthenticationResult.scrapingNode.scrapingNodeId].Done();
139139
return r;
140140
}
141-
Logger.Log("Found apps to scrape. Adding them to the DB.");
142-
ScrapingNodeMongoDBManager.AddAppsToScrape(taskResult.appsToScrape, scrapingNodeAuthenticationResult.scrapingNode);
141+
142+
if (taskResult.appsToScrape.Count > 0)
143+
{
144+
Logger.Log("Found apps to scrape. Adding them to the DB.");
145+
ScrapingNodeMongoDBManager.AddAppsToScrape(taskResult.appsToScrape, scrapingNodeAuthenticationResult.scrapingNode);
146+
}
147+
else
148+
{
149+
Logger.Log("No new apps present in task result. Ignoring");
150+
}
143151
r.processed = true;
144152
r.processedCount = taskResult.appsToScrape.Count;
145153
r.msg = "Added " + taskResult.appsToScrape.Count + " apps to scrape. Thanks for the cooperation.";

0 commit comments

Comments
 (0)