diff options
author | 2021-02-03 12:25:51 +0100 | |
---|---|---|
committer | 2021-02-03 12:25:51 +0100 | |
commit | b1c8e62a7e8ae600a672c4ad3e33b607c8570890 (patch) | |
tree | a4e7770e5b79a54ddf001207321e6ac90383d96b | |
parent | Create a task for setting the redis result instead of awaiting (diff) |
Use create_task util
-rw-r--r-- | bot/exts/info/doc/_batch_parser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/doc/_batch_parser.py b/bot/exts/info/doc/_batch_parser.py index 2407a603a..d18a455d8 100644 --- a/bot/exts/info/doc/_batch_parser.py +++ b/bot/exts/info/doc/_batch_parser.py @@ -14,6 +14,7 @@ from bs4 import BeautifulSoup import bot from bot.constants import Channels +from bot.utils import scheduling from . import _cog, doc_cache from ._parsing import get_symbol_markdown @@ -149,9 +150,9 @@ class BatchParser: partial(get_symbol_markdown, soup, item), ) if markdown is not None: - asyncio.create_task(doc_cache.set(item, markdown)) + scheduling.create_task(doc_cache.set(item, markdown)) else: - asyncio.create_task(self.stale_inventory_notifier.send_warning(item)) + scheduling.create_task(self.stale_inventory_notifier.send_warning(item)) except Exception as e: log.exception(f"Unexpected error when handling {item}") future.set_exception(e) |