Merge branch 'master' into mq-subscribe
This commit is contained in:
@@ -328,7 +328,7 @@ func ReadUrlAsStreamAuthenticated(fileUrl, jwt string, cipherKey []byte, isConte
|
||||
}
|
||||
defer CloseResponse(r)
|
||||
if r.StatusCode >= 400 {
|
||||
retryable = r.StatusCode == http.StatusNotFound || r.StatusCode >= 500
|
||||
retryable = r.StatusCode == http.StatusNotFound || r.StatusCode >= 499
|
||||
return retryable, fmt.Errorf("%s: %s", fileUrl, r.Status)
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,17 @@ func (logBuffer *LogBuffer) LoopProcessLogData(readerName string, startPosition
|
||||
isDone = true
|
||||
return
|
||||
}
|
||||
logBuffer.RLock()
|
||||
lastTsNs := logBuffer.LastTsNs
|
||||
for lastTsNs == logBuffer.LastTsNs {
|
||||
logBuffer.RUnlock()
|
||||
loopTsNs := lastTsNs // make a copy
|
||||
|
||||
for lastTsNs == loopTsNs {
|
||||
if waitForDataFn() {
|
||||
// Update loopTsNs and loop again
|
||||
logBuffer.RLock()
|
||||
loopTsNs = logBuffer.LastTsNs
|
||||
logBuffer.RUnlock()
|
||||
continue
|
||||
} else {
|
||||
isDone = true
|
||||
|
||||
Reference in New Issue
Block a user