Skip to content

Commit

Permalink
Fix for problem found by Seth Vidal:
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Oct 25, 2010
1 parent b54918f commit 6b7fbaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planet/spider.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ def spiderPlanet(only_if_new = False):
# Process the results as they arrive # Process the results as they arrive
feeds_seen = {} feeds_seen = {}
while fetch_queue.qsize() or parse_queue.qsize() or threads: while fetch_queue.qsize() or parse_queue.qsize() or threads:
while parse_queue.qsize() == 0 and threads:
time.sleep(0.1)
while parse_queue.qsize(): while parse_queue.qsize():
(uri, feed_info, feed) = parse_queue.get(False) (uri, feed_info, feed) = parse_queue.get(False)
try: try:
Expand Down Expand Up @@ -487,6 +485,8 @@ def spiderPlanet(only_if_new = False):
traceback.format_tb(tb)): traceback.format_tb(tb)):
log.error(line.rstrip()) log.error(line.rstrip())


time.sleep(0.1)

for index in threads.keys(): for index in threads.keys():
if not threads[index].isAlive(): if not threads[index].isAlive():
del threads[index] del threads[index]
Expand Down

0 comments on commit 6b7fbaf

Please sign in to comment.