-
-
Save AnderRV/ca76b6733c381c0949fdc2be45900881 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maximum_items = 5 | |
while True: | |
visited = connection.scard('crawling:visited') # count URLs in visited | |
queued = connection.scard('crawling:queued') | |
if queued + visited > maximum_items: | |
print('Exiting! Over maximum') | |
break | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment