From 20b36a7c67e96923068e1a6d10088e862e9608aa Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 16 May 2022 08:14:39 +0100 Subject: [PATCH] Improve cleanup message --- handler/db.py | 2 +- handler/sources/local.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/db.py b/handler/db.py index 6a82921..13be412 100644 --- a/handler/db.py +++ b/handler/db.py @@ -129,7 +129,7 @@ def cleanup(subclass, references): for tx, reference in get_ref_map().items(): if reference not in references: if get_subclass(reference) == subclass: - logmessage = f"{reference}: Archiving trade reference. TX: {tx}" + logmessage = f"[{reference}] ({subclass}): Archiving trade reference. TX: {tx}" messages.append(logmessage) log.info(logmessage) r.rename(f"trade.{tx}.reference", f"archive.trade.{tx}.reference") diff --git a/handler/sources/local.py b/handler/sources/local.py index 3a069a5..e0e8a45 100644 --- a/handler/sources/local.py +++ b/handler/sources/local.py @@ -186,7 +186,7 @@ class Local(util.Base): current_trades.append(reference) messages = db.cleanup(self.platform, current_trades) for message in messages: - self.ux.irc.sendmsg(f"{self.platform}: {message}") + self.ux.irc.sendmsg(message) def got_recent_messages(self, messages, send_irc=True): """