Skip to content
Snippets Groups Projects
Commit b17a052d authored by Tulir Asokan's avatar Tulir Asokan :cat2:
Browse files

Use new wrapper for creating background tasks

parent b2f2b12a
No related branches found
No related tags found
No related merge requests found
Pipeline #10642 passed
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import Type from typing import Type
import asyncio
from sqlalchemy import MetaData from sqlalchemy import MetaData
from maubot import Plugin from maubot import Plugin
from mautrix.util import background_task
from .db import Database from .db import Database
from .webhook import WebhookManager, WebhookHandler from .webhook import WebhookManager, WebhookHandler
...@@ -93,7 +93,7 @@ class GitHubBot(Plugin): ...@@ -93,7 +93,7 @@ class GitHubBot(Plugin):
self.commands.reload_config() self.commands.reload_config()
if self.config["reset_tokens"]: if self.config["reset_tokens"]:
asyncio.create_task(self.reset_tokens()) background_task.create(self.reset_tokens())
@classmethod @classmethod
def get_config_class(cls) -> Type[Config]: def get_config_class(cls) -> Type[Config]:
......
maubot: 0.3.0 maubot: 0.4.1
id: xyz.maubot.github id: xyz.maubot.github
version: 0.1.2 version: 0.1.2
license: AGPL-3.0-or-later license: AGPL-3.0-or-later
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment