diff --git a/aprsd/email.py b/aprsd/email.py index 594be63..800674a 100644 --- a/aprsd/email.py +++ b/aprsd/email.py @@ -343,6 +343,8 @@ class APRSDEmailThread(threads.APRSDThread): def run(self): global check_email_delay + LOG.debug("Starting") + check_email_delay = 60 past = datetime.datetime.now() while not self.thread_stop: @@ -358,7 +360,7 @@ class APRSDEmailThread(threads.APRSDThread): # any send/receive/resend activity will reset this to 60 seconds if check_email_delay < 300: check_email_delay += 1 - # LOG.debug("check_email_delay is " + str(check_email_delay) + " seconds") + LOG.debug("check_email_delay is " + str(check_email_delay) + " seconds") shortcuts = CONFIG["shortcuts"] # swap key/value @@ -380,7 +382,7 @@ class APRSDEmailThread(threads.APRSDThread): continue messages = server.search(["SINCE", today]) - # LOG.debug("{} messages received today".format(len(messages))) + LOG.debug("{} messages received today".format(len(messages))) for msgid, data in server.fetch(messages, ["ENVELOPE"]).items(): envelope = data[b"ENVELOPE"] @@ -413,7 +415,6 @@ class APRSDEmailThread(threads.APRSDThread): from_addr = shortcuts_inverted[from_addr] reply = "-" + from_addr + " " + body.decode(errors="ignore") - # messaging.send_message(CONFIG["ham"]["callsign"], reply) msg = messaging.TextMessage( self.config["aprs"]["login"], self.config["ham"]["callsign"], diff --git a/aprsd/plugins/query.py b/aprsd/plugins/query.py index ec1238f..70475c8 100644 --- a/aprsd/plugins/query.py +++ b/aprsd/plugins/query.py @@ -1,3 +1,4 @@ +import datetime import logging import re @@ -17,7 +18,11 @@ class QueryPlugin(plugin.APRSDPluginBase): LOG.info("Query COMMAND") tracker = messaging.MsgTrack() - reply = "Pending messages ({})".format(len(tracker)) + now = datetime.datetime.now() + reply = "Pending messages ({}) {}".format( + len(tracker), + now.strftime("%H:%M:%S"), + ) searchstring = "^" + self.config["ham"]["callsign"] + ".*" # only I can do admin commands