Skip to content

Commit

Permalink
added 6 mins ttl for each user_sessions
Browse files Browse the repository at this point in the history
Signed-off-by: manisha kumari <[email protected]>
  • Loading branch information
ManishaKumari295 committed Sep 17, 2024
1 parent 2d32a3d commit d1eb3fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).

### Changed
- Added TTl to each entry in user-session within etcd
- TTl value is 11 minutes
- TTl value is 6 minutes

## [6.11.0] - 2024-01-31

Expand Down
2 changes: 1 addition & 1 deletion backend/store/etcd/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (s *Store) GetSession(ctx context.Context, username, sessionID string) (str
func (s *Store) UpdateSession(ctx context.Context, username, sessionID, state string) error {
leaseResp, err := s.client.Grant(ctx, 60*6)
if err != nil {
fmt.Errorf("%s", err)
return fmt.Errorf("%s", err)
}
if _, err := s.client.Put(ctx, userSessionPath(username, sessionID), state, clientv3.WithLease(leaseResp.ID)); err != nil {
return err
Expand Down

0 comments on commit d1eb3fb

Please sign in to comment.