diff options
| author | bwarsaw | 1999-02-27 17:05:54 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-02-27 17:05:54 +0000 |
| commit | 28e699eb8735931a6f4247c8439d8ede1f684594 (patch) | |
| tree | 4e8eab9e52e0b7848af6340cf5c94cec94025506 /Mailman/OutgoingQueue.py | |
| parent | c36dd7800f4ba0162643dbda2b74bc8b99686b09 (diff) | |
| download | mailman-28e699eb8735931a6f4247c8439d8ede1f684594.tar.gz mailman-28e699eb8735931a6f4247c8439d8ede1f684594.tar.zst mailman-28e699eb8735931a6f4247c8439d8ede1f684594.zip | |
processQueue(): crank the hung_timeout on the lock to a hugely long
amount of time (4 hours). This should eliminate most errors reported
on the unlink() in dequeueMessage.
dequeueMessage(): Ignore ENOENT errors -- they probably mean the lock
was stolen.
Diffstat (limited to 'Mailman/OutgoingQueue.py')
| -rw-r--r-- | Mailman/OutgoingQueue.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Mailman/OutgoingQueue.py b/Mailman/OutgoingQueue.py index 5ab7b8358..cd59c27c3 100644 --- a/Mailman/OutgoingQueue.py +++ b/Mailman/OutgoingQueue.py @@ -82,7 +82,9 @@ def processQueue(): import Utils lock_file = flock.FileLock( - os.path.join(mm_cfg.LOCK_DIR, "mmqueue_run.lock")) + os.path.join(mm_cfg.LOCK_DIR, "mmqueue_run.lock"), + # running the queue can take a long time. + hung_timeout=14400) lock_file.lock() files = os.listdir(mm_cfg.DATA_DIR) for file in files: @@ -176,4 +178,11 @@ def deferMessage(q_entry): # remove it from the queue # def dequeueMessage(q_entry): - os.unlink(q_entry) + try: + os.unlink(q_entry) + except os.error, (code, msg): + if code == errno.ENOENT: + # file does not exist, probably because the lock was stolen + pass + else: + Utils.reraise() |
