From 964687aadea88d323f3567c19b9eb5a6b92a0905 Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 24 Jul 2024 18:54:23 +0200 Subject: [PATCH] Update schema for debug feature --- src/domain_manager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/domain_manager.py b/src/domain_manager.py index 83ffaf8..2feb440 100644 --- a/src/domain_manager.py +++ b/src/domain_manager.py @@ -105,9 +105,8 @@ class DomainManager: req_id: str = split_payload[2] json_string: str = json.dumps(json_object) for json_part in self.chunkstring(json_string, 7950): - await connection.execute("select pg_notify('debugresponse', 'DUMP ' || $1 || ' ' || $2);", req_id, json_part) + await connection.execute("select pg_notify('debugresponse', 'DUMP CHUNK ' || $1 || ' ' || $2);", req_id, json_part) await connection.execute("select pg_notify('debugresponse', 'DUMP END ' || $1);", req_id) - await connection.execute("select pg_notify('debugresponse', 'DUMP ' || $1);", json.dumps(json_object)) # TODO Remove legacy option elif split_payload[1] == "SITE" and len(split_payload) > 3: logger.info(f"Received {' '.join(split_payload)} on pub/sub. Preparing JSON with data...") req_id: str = split_payload[2] @@ -117,7 +116,7 @@ class DomainManager: logger.debug("Wiki specified in pub/sub message has been found. Preparing and sending dump.") json_string: str = json.dumps(wiki.json()) for json_part in self.chunkstring(json_string, 7950): - await connection.execute("select pg_notify('debugresponse', 'SITE ' || $1 || ' ' || $2);", + await connection.execute("select pg_notify('debugresponse', 'SITE CHUNK ' || $1 || ' ' || $2);", req_id, json_part) await connection.execute("select pg_notify('debugresponse', 'SITE END ' || $1);", req_id)