Skip to content

Commit

Permalink
fix redis md5 ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
rroemhild committed May 14, 2018
1 parent 34c792e commit 241a949
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lavatar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def update_md5db_thread():
redis_store.set(mail_md5, user.dn)
redis_store.expire(mail_md5, ttl)
else:
if redis_store.get(mail_md5) != user.dn:
# update user DN if changed
redis_store.set(mail_md5, user.dn)
# update ttl
redis_store.expire(mail_md5, ttl)

app.logger.info('Found %s people entries in LDAP - updated Redis.',
Expand Down

0 comments on commit 241a949

Please sign in to comment.