mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-05 23:12:21 +00:00
Add missing cancel() in tasks example
This commit is contained in:
@@ -116,6 +116,9 @@ Doing something during cancellation:
|
|||||||
self.lock = asyncio.Lock()
|
self.lock = asyncio.Lock()
|
||||||
self.bulker.start()
|
self.bulker.start()
|
||||||
|
|
||||||
|
async def cog_unload(self):
|
||||||
|
self.bulker.cancel()
|
||||||
|
|
||||||
async def do_bulk(self):
|
async def do_bulk(self):
|
||||||
# bulk insert data here
|
# bulk insert data here
|
||||||
...
|
...
|
||||||
|
|||||||
Reference in New Issue
Block a user