Skip to content
Snippets Groups Projects
Commit a1f9cdfe authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Add keep alive function for locks

parent 25baa5ff
Branches
Tags v1.224.0
No related merge requests found
......@@ -290,3 +290,11 @@ func (r ClientWithHelpers) SetLockKey(key string, expiration time.Duration, lock
return success, nil
}
func (r ClientWithHelpers) KeepLockKeyAlive(key string, expiration time.Duration) {
if !r.IsConnected() {
return
}
_ = r.Client.Expire(ctx, key, expiration)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment