[PATCH 0/2] Atomicity & parsemail.sh

Damien Lespiau damien.lespiau at intel.com
Tue Oct 20 23:08:41 AEDT 2015


With the series support in production, I realized that postfix did not
serialize the spawing of parsemail.sh. I couldn't find clear
documentation about that specific case: serializing mail delivery to a
mailbox is possible, not sure when postfix is piping the mail to a
another process.

Instead of digging further and look at postfix code, implementing the
serialization in parsemail.py itself seemed like a good idea: this will
work independently to the MTA used. Not only that, but it'd also work if
we do crazy things like allowing to submit patches through another entry
point.

-- 
Damien

Damien Lespiau (2):
  lock: Import file lock class from mercurial
  parsemail: Make parsing an email atomic operation

 patchwork/bin/parsemail.py   |  20 +++
 patchwork/lock.py            | 301 +++++++++++++++++++++++++++++++++++++++++++
 patchwork/tests/test_lock.py | 290 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 611 insertions(+)
 create mode 100644 patchwork/lock.py
 create mode 100644 patchwork/tests/test_lock.py

-- 
2.4.3



More information about the Patchwork mailing list