diff options
Diffstat (limited to 'modules/tracking.py')
-rw-r--r-- | modules/tracking.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 3533ee9..43435a1 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -341,6 +341,11 @@ class Module: session.add(package) if announce: self.irc.msg(target, msg) + elif package.last != None and package.last < datetime.datetime.utcnow() - datetime.timedelta(hours = 24*30): + msg = '%s: Removing stale package \002%s\002%s' % (consignment.nick, consignment.code, label) + self.irc.msg(target, msg.encode('utf-8')) + session.delete(package) + removed = True if removed and len(consignment.packages) == 0: msg = '%s: \002%s\002%s is no longer being tracked' % (consignment.nick, consignment.code, label) self.irc.msg(target, msg.encode('utf-8')) |