Cancel unnecessary subscription tasks

This commit is contained in:
Sophie Tauchert 2023-01-21 16:54:33 +01:00
parent 8e43db2533
commit 256aa8f315
No known key found for this signature in database
GPG key ID: 52701DE5F5F51125
2 changed files with 9 additions and 0 deletions

View file

@ -111,6 +111,12 @@ class DB:
"""
await self.db.execute(query, topic_id, event_id)
async def clear_topic_id(self, topic_id: int) -> None:
query = """
UPDATE topics SET last_event_id=NULL where id=$1
"""
await self.db.execute(query, topic_id)
async def create_topic(self, topic: Topic) -> Topic:
query = """
INSERT INTO topics (server, topic, last_event_id)