mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 07:34:48 -04:00
Add more logging around message retention policies support (#6717)
So we can debug issues like #6683 more easily
This commit is contained in:
parent
5909751936
commit
a17f64361c
3 changed files with 22 additions and 0 deletions
|
@ -88,6 +88,8 @@ class PaginationHandler(object):
|
|||
if hs.config.retention_enabled:
|
||||
# Run the purge jobs described in the configuration file.
|
||||
for job in hs.config.retention_purge_jobs:
|
||||
logger.info("Setting up purge job with config: %s", job)
|
||||
|
||||
self.clock.looping_call(
|
||||
run_as_background_process,
|
||||
job["interval"],
|
||||
|
@ -130,11 +132,22 @@ class PaginationHandler(object):
|
|||
else:
|
||||
include_null = False
|
||||
|
||||
logger.info(
|
||||
"[purge] Running purge job for %d < max_lifetime <= %d (include NULLs = %s)",
|
||||
min_ms,
|
||||
max_ms,
|
||||
include_null,
|
||||
)
|
||||
|
||||
rooms = yield self.store.get_rooms_for_retention_period_in_range(
|
||||
min_ms, max_ms, include_null
|
||||
)
|
||||
|
||||
logger.debug("[purge] Rooms to purge: %s", rooms)
|
||||
|
||||
for room_id, retention_policy in iteritems(rooms):
|
||||
logger.info("[purge] Attempting to purge messages in room %s", room_id)
|
||||
|
||||
if room_id in self._purges_in_progress_by_room:
|
||||
logger.warning(
|
||||
"[purge] not purging room %s as there's an ongoing purge running"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue