Skip to content

Commit

Permalink
Merge branch 'main' into emran/split-chunks-for-concat
Browse files Browse the repository at this point in the history
  • Loading branch information
thomshutt authored Apr 9, 2024
2 parents acae61b + 1aa4ef0 commit 2302917
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions handlers/geolocation/geolocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,9 @@ func (c *GeolocationHandlersCollection) getStreamPull(playbackID string) (string
return "", nil
}

// Feature flag to lock only for test accounts
if isTestAccount(stream) {
glog.Infof("LockPull for stream %v", playbackID)
if err := c.Lapi.LockPull(stream.ID, lockPullLeaseTimeout, c.Config.NodeName); err != nil {
return "", errLockPull
}
glog.Infof("LockPull for stream %v", playbackID)
if err := c.Lapi.LockPull(stream.ID, lockPullLeaseTimeout, c.Config.NodeName); err != nil {
return "", errLockPull
}

if len(stream.Pull.Headers) == 0 {
Expand Down Expand Up @@ -360,11 +357,3 @@ func isValidGPSCoord(lat, lon string) bool {
}
return latF >= -90 && latF <= 90 && lonF >= -180 && lonF <= 180
}

// Feature flag to check if the duplicate stream fix works
// 67281_11889_11889, 67281_11879_11879, 67281_11889_11889 are test streams, so we can test it in Trovo Test website
func isTestAccount(stream *api.Stream) bool {
return strings.Contains(stream.Pull.Source, "67281_11878_11878") ||
strings.Contains(stream.Pull.Source, "67281_11879_11879") ||
strings.Contains(stream.Pull.Source, "67281_11889_11889")
}

0 comments on commit 2302917

Please sign in to comment.