Skip to content

Commit 5180238

Browse files
committed
Switch to non-deprecated method in event.py
1 parent 666f01d commit 5180238

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cloudbot/event.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def prepare(self):
157157
# we're running a coroutine hook with a db, so initialise an executor pool
158158
self.db_executor = concurrent.futures.ThreadPoolExecutor(1)
159159
# be sure to initialize the db in the database executor, so it will be accessible in that thread.
160-
self.db = yield from self.async(self.bot.db_session)
160+
self.db = yield from self.async_call(self.bot.db_session)
161161

162162
def prepare_threaded(self):
163163
"""
@@ -193,7 +193,7 @@ def close(self):
193193
if self.db is not None:
194194
#logger.debug("Closing database session for {}:threaded=False".format(self.hook.description))
195195
# be sure the close the database in the database executor, as it is only accessable in that one thread
196-
yield from self.async(self.db.close)
196+
yield from self.async_call(self.db.close)
197197
self.db = None
198198

199199
def close_threaded(self):

0 commit comments

Comments
 (0)