diff options
author | 2021-02-28 00:40:52 +0100 | |
---|---|---|
committer | 2021-02-28 00:40:52 +0100 | |
commit | 02c0d1535b46922096d53967e2938bbb3a56ef82 (patch) | |
tree | c3a1aeeda50f864b557ae36bfec1255f34413968 | |
parent | Add digits to package covnerter (diff) |
Add new symbols to front of queue instead of extending the end
Using extend caused old items, including the ones that were requested
by users and pushed to the front, to be pushed back by all of the items
on the new page, possibly significantly delaying their parsing
-rw-r--r-- | bot/exts/info/doc/_batch_parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/info/doc/_batch_parser.py b/bot/exts/info/doc/_batch_parser.py index 9956878cf..780fb16d9 100644 --- a/bot/exts/info/doc/_batch_parser.py +++ b/bot/exts/info/doc/_batch_parser.py @@ -118,7 +118,7 @@ class BatchParser: "lxml", ) - self._queue.extend(QueueItem(item, soup) for item in self._page_doc_items[doc_item.url]) + self._queue[:0] = (QueueItem(item, soup) for item in self._page_doc_items[doc_item.url]) log.debug(f"Added items from {doc_item.url} to parse queue.") if self._parse_task is None: |