From: Stephen Gran Date: Fri, 9 Mar 2012 20:17:26 +0000 (+0000) Subject: Write both time of last ldap update and time of last run to trace file X-Git-Tag: userdir-ldap-0.3.85~76 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=0fde94b6b3add31a1c17933cfda802bdabfe831e;p=mirror%2Fuserdir-ldap.git Write both time of last ldap update and time of last run to trace file Signed-off-by: Stephen Gran --- diff --git a/ud-generate b/ud-generate index d699633..004e64a 100755 --- a/ud-generate +++ b/ud-generate @@ -1246,11 +1246,10 @@ except IOError, e: else: raise e -fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") -fd.write("%s\n%s\n" % (last, int(time.time()))) -fd.close() - if cache_last_mod[0] >= last: + fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") + fd.write("%s\n%s\n" % (last, int(time.time()))) + fd.close() sys.exit(0) # Fetch all the groups @@ -1282,6 +1281,10 @@ finally: if lock is not None: lock.release() +fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") +fd.write("%s\n%s\n" % (last, int(time.time()))) +fd.close() + # vim:set et: # vim:set ts=3: # vim:set shiftwidth=3: