Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 25 by n.leush: break_lock needed on LockTimeout
http://code.google.com/p/django-mailer/issues/detail?id=25

'send_all' process can die before lock.release() when server fails.

In this case lock file will block sending any mails.

I used lock.break_lock() to solve the problem.

     try:
         lock.acquire(LOCK_WAIT_TIMEOUT)
     except AlreadyLocked:
         logging.debug("lock already in place. quitting.")
         return
     except LockTimeout:
         if LOCK_WAIT_TIMEOUT == -1:
             logging.debug("waiting for the lock timed out. quitting.")
             return
         else:
             logging.debug("killing existing lock because of timeout.")
             lock.break_lock()
     logging.debug("acquired.")

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to