feat(backend): everyday update of an assets' version
This commit is contained in:
parent
197c39f96a
commit
6196e79d00
1 changed files with 9 additions and 2 deletions
|
|
@ -5,11 +5,18 @@ import (
|
|||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"openreplay/backend/pkg/flakeid"
|
||||
)
|
||||
|
||||
func getSessionKey(sessionID uint64) string {
|
||||
// Based on timestamp, changes once per week. Check pkg/flakeid for understanding sessionID
|
||||
return strconv.FormatUint(sessionID>>50, 10)
|
||||
return strconv.FormatUint(
|
||||
uint64(time.UnixMilli(
|
||||
int64(flakeid.ExtractTimestamp(sessionID)),
|
||||
).Weekday()),
|
||||
10,
|
||||
)
|
||||
}
|
||||
|
||||
func ResolveURL(baseurl string, rawurl string) string {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue