mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-03 05:08:59 +01:00
Add some log information at returned replication streams
This commit is contained in:
parent
97b9141245
commit
5d8a93a10e
1 changed files with 11 additions and 0 deletions
|
@ -159,6 +159,17 @@ class ReplicationResource(Resource):
|
||||||
|
|
||||||
result = yield self.notifier.wait_for_replication(replicate, timeout)
|
result = yield self.notifier.wait_for_replication(replicate, timeout)
|
||||||
|
|
||||||
|
for stream_name, stream_content in result.items():
|
||||||
|
logger.info(
|
||||||
|
"Replicating %d rows of %s from %s -> %s",
|
||||||
|
len(stream_content["rows"]),
|
||||||
|
stream_name,
|
||||||
|
stream_content["position"],
|
||||||
|
request_streams.get(stream_name),
|
||||||
|
)
|
||||||
|
if stream_content["position"] == request_streams.get(stream_name):
|
||||||
|
logger.warn("Returning same position for stream: %s", stream_name)
|
||||||
|
|
||||||
request.write(json.dumps(result, ensure_ascii=False))
|
request.write(json.dumps(result, ensure_ascii=False))
|
||||||
finish_request(request)
|
finish_request(request)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue