aboutsummaryrefslogtreecommitdiffstats
path: root/src/acit/types.py
diff options
context:
space:
mode:
authorVosjedev <vosje@vosjedev.net>2025-12-06 09:26:46 +0100
committerVosjedev <vosje@vosjedev.net>2025-12-06 09:26:46 +0100
commit9f481f33fba336f86ef4b9b431f354d8e8ba5d77 (patch)
tree7fac29e6100d7431ba3a25794d855dbdfadce318 /src/acit/types.py
parenta455e4696076a476cd73b58e75092ff3ea519b7a (diff)
downloadacit-9f481f33fba336f86ef4b9b431f354d8e8ba5d77.tar.gz
acit-9f481f33fba336f86ef4b9b431f354d8e8ba5d77.tar.bz2
acit-9f481f33fba336f86ef4b9b431f354d8e8ba5d77.tar.xz
A lot of changes
- don't send emails multiple times - fix the forwarding procedure - send secure tokens automatically instead of on-request - ignore duplicate emails (matches by message-id) - allow passing an SMTP `to` to `sendmail()`, instead of always using the headers - don't add self to cc when not needed, etc etc - introduce a postprocessor function mechanism that runs a function right after our sendmail() processes your email, and right before adding it to the smtp queue
Diffstat (limited to 'src/acit/types.py')
-rw-r--r--src/acit/types.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/acit/types.py b/src/acit/types.py
index 3d41297..37f1e8c 100644
--- a/src/acit/types.py
+++ b/src/acit/types.py
@@ -99,6 +99,9 @@ class Site():
script=getenv("ACIT_LIST_TRACKERS","/usr/lib/acit-list-trackers")
proc=subprocess.run(script,capture_output=True)
+ cur.execute("SELECT name FROM trackers")
+ old_trackers=[ item[0] for item in cur ]
+
if proc.stderr:
log("Refresh script generated STDERR:")
log(proc.stderr)
@@ -116,11 +119,13 @@ class Site():
#log(name)
+
cur.execute("REPLACE INTO trackers (name,homepage) VALUES (?,?)",(name,homepage))
conn.commit()
#self.update_all_bugpages(conn,cur,trackerfilter=name)
- cherrypy.engine.publish("regen",name,None)
+ if not name in old_trackers:
+ cherrypy.engine.publish("regen",name,None)
self.last_tracker_update=datetime.now()