mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 17:47:19 +00:00
Partial Backport of #18415 Instead of using an asynchronous goroutine to push to disk on shutdown just close the datachan and immediately push to the disk. Prevents messages of incompletely flushed queues. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -195,9 +195,11 @@ loop:
|
||||
}
|
||||
}
|
||||
|
||||
var errQueueEmpty = fmt.Errorf("empty queue")
|
||||
var errEmptyBytes = fmt.Errorf("empty bytes")
|
||||
var errUnmarshal = fmt.Errorf("failed to unmarshal")
|
||||
var (
|
||||
errQueueEmpty = fmt.Errorf("empty queue")
|
||||
errEmptyBytes = fmt.Errorf("empty bytes")
|
||||
errUnmarshal = fmt.Errorf("failed to unmarshal")
|
||||
)
|
||||
|
||||
func (q *ByteFIFOQueue) doPop() error {
|
||||
q.lock.Lock()
|
||||
|
Reference in New Issue
Block a user