Ensure SIGHUP never triggers a new email batch across all watch() implementations (#704)

* Initial plan

* Ensure SIGHUP never starts a new email batch in any watch() implementation

Co-authored-by: seanthegeek <44679+seanthegeek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/domainaware/parsedmarc/sessions/45d5be30-8f6b-4200-9bdd-15c655033f17

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: seanthegeek <44679+seanthegeek@users.noreply.github.com>
This commit is contained in:
Copilot
2026-03-20 19:12:46 -04:00
committed by GitHub
parent 565c415280
commit d2a0f85303
3 changed files with 6 additions and 0 deletions
+2
View File
@@ -284,6 +284,8 @@ class MSGraphConnection(MailboxConnection):
if should_reload and should_reload():
return
sleep(check_timeout)
if should_reload and should_reload():
return
check_callback(self)
@lru_cache(maxsize=10)
+2
View File
@@ -94,6 +94,8 @@ class IMAPConnection(MailboxConnection):
check_callback(self)
while True:
if should_reload and should_reload():
return
try:
IMAPClient(
host=self._client.host,
+2
View File
@@ -65,6 +65,8 @@ class MaildirConnection(MailboxConnection):
def watch(self, check_callback, check_timeout, should_reload=None):
while True:
if should_reload and should_reload():
return
try:
check_callback(self)
except Exception as e: