File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 44 Changelog
55=========
66
7+
8+ - :release: `9.3.1 <23rd December 2022> `
9+ - :bug: `170 ` Save references of newly created tasks in :obj: `pydis_core.utils.scheduling `
10+
711- :release: `9.3.0 <13th December 2022> `
812- :feature: `169 ` Return :obj: `None ` upon receiving a bad request from Discord in :obj: `pydis_core.utils.members.get_or_fetch_member `
913
Original file line number Diff line number Diff line change 1010
1111from pydis_core .utils import logging
1212
13+ _background_tasks : set [asyncio .Task ] = set ()
14+
1315
1416class Scheduler :
1517 """
@@ -238,6 +240,9 @@ def create_task(
238240 task = event_loop .create_task (coro , ** kwargs )
239241 else :
240242 task = asyncio .create_task (coro , ** kwargs )
243+
244+ _background_tasks .add (task )
245+ task .add_done_callback (_background_tasks .discard )
241246 task .add_done_callback (partial (_log_task_exception , suppressed_exceptions = suppressed_exceptions ))
242247 return task
243248
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " pydis_core"
3- version = " 9.3.0 "
3+ version = " 9.3.1 "
44description = " PyDis core provides core functionality and utility to the bots of the Python Discord community."
55authors = [" Python Discord <info@pythondiscord.com>" ]
66license = " MIT"
You can’t perform that action at this time.
0 commit comments