Await sync_to_async in irc bot.

This commit is contained in:
Vidir Valberg Gudmundsson 2020-03-05 08:09:07 +01:00
parent be47e43969
commit 7e2981e855
1 changed files with 3 additions and 3 deletions

View File

@ -118,9 +118,9 @@ class Plugin(object):
# call the methods we need to
# call them with sync_to_async to be able to access database
sync_to_async(self.bot.check_irc_channels)()
sync_to_async(self.bot.fix_missing_acls)()
sync_to_async(self.bot.get_outgoing_messages)()
await sync_to_async(self.bot.check_irc_channels)()
await sync_to_async(self.bot.fix_missing_acls)()
await sync_to_async(self.bot.get_outgoing_messages)()
# schedule a call of this function again in N seconds
self.bot.loop.call_later(