diff options
| author | bwarsaw | 1999-08-20 23:27:27 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-08-20 23:27:27 +0000 |
| commit | b4e5954f98fdbf29cacb0ad012167d0a6c635713 (patch) | |
| tree | 2d5a9b3ee76ac14cf4a49eb3b28933e81df9f614 | |
| parent | 018d09e5cb7c6dcdd302d9c608da9343ebed35d5 (diff) | |
| download | mailman-b4e5954f98fdbf29cacb0ad012167d0a6c635713.tar.gz mailman-b4e5954f98fdbf29cacb0ad012167d0a6c635713.tar.zst mailman-b4e5954f98fdbf29cacb0ad012167d0a6c635713.zip | |
flock => LockFile
hung_timeout => lifetime
| -rwxr-xr-x | cron/gate_news | 6 | ||||
| -rw-r--r-- | cron/run_queue | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cron/gate_news b/cron/gate_news index 12f490bfa..f5a82eb74 100755 --- a/cron/gate_news +++ b/cron/gate_news @@ -27,7 +27,7 @@ import errno from Mailman import MailList from Mailman import mm_cfg from Mailman import Utils -from Mailman import flock +from Mailman import LockFile # Work around known problems with some RedHat cron daemons import signal @@ -65,10 +65,10 @@ def main(): # up the lock because we're setting a hung_time out of 4 minutes. # This means that if we crashed, the next time the cron job runs, # it'll just wax the lock and try again. - lock = flock.FileLock(LIST_LOCK_FILE + name, hung_timeout=240) + lock = LockFile.LockFile(LIST_LOCK_FILE + name, lifetime=240) try: lock.lock(timeout=0.001) - except flock.TimeOutError: + except LockFile.TimeOutError: # someone else is gating this list already continue # open up a connection to the gated newsgroup. we want to get the diff --git a/cron/run_queue b/cron/run_queue index a6082c16f..177ab921b 100644 --- a/cron/run_queue +++ b/cron/run_queue @@ -24,7 +24,7 @@ import os import sys import paths from Mailman import OutgoingQueue -from Mailman import flock +from Mailman.LockFile import LockFile from Mailman import mm_cfg # Work around known problems with some RedHat cron daemons @@ -33,9 +33,9 @@ signal.signal(signal.SIGCHLD, signal.SIG_DFL) def main(): path = os.path.join(mm_cfg.LOCK_DIR, 'mmqueue_run.lock') - lockfile = flock.FileLock(path, - # running the queue can take a long time - hung_timeout=14400) + lockfile = LockFile(path, + # running the queue can take a long time + lifetime=14400) lockfile.lock() try: OutgoingQueue.processQueue() |
