mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 10:27:08 +02:00
refactor(api): shorten the grant touch comment
This commit is contained in:
parent
45d8a7724d
commit
550e03976c
1 changed files with 1 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ func (s *Service) settleEpoch(ctx context.Context, grantID string) (*model.Grant
|
|||
return g, u, nil
|
||||
}
|
||||
|
||||
// touch writes last_used at most every touchInterval (a zero lastUsed means never); the SQL condition keeps that true across nodes.
|
||||
// touch writes last_used at most every touchInterval (zero lastUsed: never used); the SQL condition holds that across nodes.
|
||||
func (s *Service) touch(ctx context.Context, id, ip string, lastUsed time.Time) {
|
||||
now := s.now()
|
||||
if !lastUsed.IsZero() && now.Before(lastUsed.Add(touchInterval)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue