mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Update schema for debug feature
This commit is contained in:
parent
1d0fd1ceea
commit
964687aade
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue