- Timestamp:
- Feb 5, 2010, 11:35:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/oursrc/hacron/hacron
r1456 r1457 59 59 60 60 def __enter__(self): 61 tries = 0 61 62 while True: 62 63 try: … … 65 66 logger.error('Could not acquire lock %s. Sleeping...' % self.name) 66 67 time.sleep(0.5) 68 tries += 1 69 if not tries % 60: 70 logger.error("Waited too long; got bored. Clearing lock %s." % self.name) 71 _remove(self.name) 67 72 else: 68 73 break … … 71 76 os.close(self.lock) 72 77 _remove(self.name) 73 78 74 79 def _touch(path): 75 80 """Effectively touches a file. Returns true if successful, false
Note: See TracChangeset
for help on using the changeset viewer.