From a09886d6356be9ea5a98a7deea0cebf31e510095 Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Wed, 3 Feb 2021 12:05:27 +0100 Subject: Remove url lock The items are added to the futures dict before a context switch can occur, making the subsequent requests to the url skip the queue extend and suspend at the future await --- bot/exts/info/doc/_batch_parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bot/exts/info/doc/_batch_parser.py b/bot/exts/info/doc/_batch_parser.py index 2edf05ff0..c16cf6d28 100644 --- a/bot/exts/info/doc/_batch_parser.py +++ b/bot/exts/info/doc/_batch_parser.py @@ -14,8 +14,7 @@ from bs4 import BeautifulSoup import bot from bot.constants import Channels -from bot.utils.lock import lock_arg -from . import NAMESPACE, _cog, doc_cache +from . import _cog, doc_cache from ._parsing import get_symbol_markdown log = logging.getLogger(__name__) @@ -98,7 +97,6 @@ class BatchParser: self.stale_inventory_notifier = StaleInventoryNotifier() - @lock_arg(NAMESPACE, "doc_item", attrgetter("url"), wait=True) async def get_markdown(self, doc_item: _cog.DocItem) -> str: """ Get the result Markdown of `doc_item`. -- cgit v1.2.3