mirror of
https://github.com/element-hq/dendrite.git
synced 2025-03-14 14:15:35 +00:00
Merge branch 'main' into msc3861
This commit is contained in:
commit
6a741b29d6
6 changed files with 9 additions and 9 deletions
|
@ -147,7 +147,7 @@ func (oq *destinationQueue) wakeQueueIfEventsPending(forceWakeup bool) {
|
|||
// or if forceWakeup is true. Otherwise there is no reason to start the
|
||||
// queue goroutine and waste resources.
|
||||
if forceWakeup || eventsPending() {
|
||||
logrus.Info("Starting queue due to pending events or forceWakeup")
|
||||
logrus.Debugf("Starting queue %q -> %q due to pending events or forceWakeup", oq.origin, oq.destination)
|
||||
oq.wakeQueueAndNotify()
|
||||
}
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -47,7 +47,7 @@ require (
|
|||
go.uber.org/atomic v1.11.0
|
||||
golang.org/x/crypto v0.32.0
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
|
||||
golang.org/x/image v0.18.0
|
||||
golang.org/x/image v0.23.0
|
||||
golang.org/x/mobile v0.0.0-20240520174638-fa72addaaa1b
|
||||
golang.org/x/sync v0.10.0
|
||||
golang.org/x/term v0.28.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -404,8 +404,8 @@ golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbR
|
|||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
|
||||
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
|
||||
golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68=
|
||||
golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mobile v0.0.0-20240520174638-fa72addaaa1b h1:WX7nnnLfCEXg+FmdYZPai2XuP3VqCP1HZVMST0n9DF0=
|
||||
golang.org/x/mobile v0.0.0-20240520174638-fa72addaaa1b/go.mod h1:EiXZlVfUTaAyySFVJb9rsODuiO+WXu8HrUuySb7nYFw=
|
||||
|
|
|
@ -86,7 +86,7 @@ func getActiveThumbnailGeneration(dst types.Path, _ types.ThumbnailSize, activeT
|
|||
activeThumbnailGeneration.Lock()
|
||||
defer activeThumbnailGeneration.Unlock()
|
||||
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
|
||||
logger.Info("Waiting for another goroutine to generate the thumbnail.")
|
||||
logger.Debugf("Waiting for another goroutine to generate the thumbnail %q", dst)
|
||||
|
||||
// NOTE: Wait unlocks and locks again internally. There is still a deferred Unlock() that will unlock this.
|
||||
activeThumbnailGenerationResult.Cond.Wait()
|
||||
|
@ -115,7 +115,7 @@ func broadcastGeneration(dst types.Path, activeThumbnailGeneration *types.Active
|
|||
activeThumbnailGeneration.Lock()
|
||||
defer activeThumbnailGeneration.Unlock()
|
||||
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
|
||||
logger.Info("Signalling other goroutines waiting for this goroutine to generate the thumbnail.")
|
||||
logger.Debugf("Signalling other goroutines waiting for this goroutine to generate the thumbnail %q", dst)
|
||||
// Note: errorReturn is a named return value error that is signalled from here to waiting goroutines
|
||||
activeThumbnailGenerationResult.Err = errorReturn
|
||||
activeThumbnailGenerationResult.Cond.Broadcast()
|
||||
|
@ -136,7 +136,7 @@ func isThumbnailExists(
|
|||
config.Width, config.Height, config.ResizeMethod,
|
||||
)
|
||||
if err != nil {
|
||||
logger.Error("Failed to query database for thumbnail.")
|
||||
logger.Errorf("Failed to query database for thumbnail %q", dst)
|
||||
return false, err
|
||||
}
|
||||
if thumbnailMetadata != nil {
|
||||
|
|
|
@ -153,7 +153,7 @@ func createThumbnail(
|
|||
"ActualWidth": width,
|
||||
"ActualHeight": height,
|
||||
"processTime": time.Now().Sub(start),
|
||||
}).Info("Generated thumbnail")
|
||||
}).Debugf("Generated thumbnail %q", dst)
|
||||
|
||||
stat, err := os.Stat(string(dst))
|
||||
if err != nil {
|
||||
|
|
|
@ -191,7 +191,7 @@ func createThumbnail(
|
|||
"ActualWidth": width,
|
||||
"ActualHeight": height,
|
||||
"processTime": time.Since(start),
|
||||
}).Info("Generated thumbnail")
|
||||
}).Debugf("Generated thumbnail %q", dst)
|
||||
|
||||
stat, err := os.Stat(string(dst))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue