Upgrade to Go 1.22 and Node v20 (#2861)
* Remove workaround for missing `context.WithoutCancel` in Go 1.20 * Upgrade to Go 1.22 * Upgrade GitHub Actions * Upgrade Node to v20
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
//go:build go1.21
|
||||
|
||||
package scanner
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
func contextWithoutCancel(ctx context.Context) context.Context {
|
||||
return context.WithoutCancel(ctx)
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build !go1.21
|
||||
|
||||
package scanner
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// TODO Remove this file when we drop support for go 1.20
|
||||
func contextWithoutCancel(ctx context.Context) context.Context {
|
||||
return context.TODO()
|
||||
}
|
||||
+1
-1
@@ -178,7 +178,7 @@ func (s *scanner) setStatusEnd(folder string, lastUpdate time.Time) {
|
||||
}
|
||||
|
||||
func (s *scanner) RescanAll(ctx context.Context, fullRescan bool) error {
|
||||
ctx = contextWithoutCancel(ctx)
|
||||
ctx = context.WithoutCancel(ctx)
|
||||
if !isScanning.TryLock() {
|
||||
log.Debug(ctx, "Scanner already running, ignoring request for rescan.")
|
||||
return ErrAlreadyScanning
|
||||
|
||||
Reference in New Issue
Block a user