From de2349e707d815518a4fe4de6ccf29cca93dfddd Mon Sep 17 00:00:00 2001 From: sgtlaggy <8661717+sgtlaggy@users.noreply.github.com> Date: Thu, 5 Jan 2023 14:01:01 -0800 Subject: [PATCH] Add missing `cancel()` in tasks example --- docs/ext/tasks/index.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/ext/tasks/index.rst b/docs/ext/tasks/index.rst index abc1b57b7..5dff26c8a 100644 --- a/docs/ext/tasks/index.rst +++ b/docs/ext/tasks/index.rst @@ -116,6 +116,9 @@ Doing something during cancellation: self.lock = asyncio.Lock() self.bulker.start() + async def cog_unload(self): + self.bulker.cancel() + async def do_bulk(self): # bulk insert data here ...