aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2021-02-28 00:40:52 +0100
committerGravatar Numerlor <[email protected]>2021-02-28 00:40:52 +0100
commit02c0d1535b46922096d53967e2938bbb3a56ef82 (patch)
treec3a1aeeda50f864b557ae36bfec1255f34413968
parentAdd 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.py2
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: