Skip to content

Commit

Permalink
handle rare race condition on corpus closure
Browse files Browse the repository at this point in the history
  • Loading branch information
boogheta committed Jun 3, 2021
1 parent 9a25ef9 commit 8b8f73f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hyphe_backend/core.tac
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ class Memory_Structure(customJSONRPC):
s = time.time()
# Build links after at least one index if no more than 25000 pages in queue and...
pages_crawled = yield self.db.check_pages(corpus)
if pages_crawled and self.corpora[corpus]['recent_changes'] and self.corpora[corpus]['pages_queued'] < 25000 and (
if pages_crawled and corpus in self.corpora and self.corpora[corpus]['recent_changes'] and self.corpora[corpus]['pages_queued'] < 25000 and (
# pagesqueue is empty
not self.corpora[corpus]['pages_queued'] or
# links were not built since more than 8 times the time it takes
Expand Down

0 comments on commit 8b8f73f

Please sign in to comment.