⬆️ Upgrade nexus to fix panic
This commit is contained in:
24
pkg/internal/cache/store.go
vendored
24
pkg/internal/cache/store.go
vendored
@ -1,24 +0,0 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/dgraph-io/ristretto"
|
||||
"github.com/eko/gocache/lib/v4/store"
|
||||
ristrettoCache "github.com/eko/gocache/store/ristretto/v4"
|
||||
)
|
||||
|
||||
var S store.StoreInterface
|
||||
|
||||
func NewStore() error {
|
||||
ristretto, err := ristretto.NewCache(&ristretto.Config{
|
||||
NumCounters: 1000,
|
||||
MaxCost: 100,
|
||||
BufferItems: 64,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
S = ristrettoCache.NewRistretto(ristretto)
|
||||
|
||||
return nil
|
||||
}
|
@ -12,7 +12,6 @@ import (
|
||||
"git.solsynth.dev/hypernet/paperclip/pkg/internal/gap"
|
||||
"github.com/fatih/color"
|
||||
|
||||
"git.solsynth.dev/hypernet/paperclip/pkg/internal/cache"
|
||||
"git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
|
||||
"git.solsynth.dev/hypernet/paperclip/pkg/internal/grpc"
|
||||
|
||||
@ -68,11 +67,6 @@ func main() {
|
||||
log.Fatal().Err(err).Msg("An error occurred when running database auto migration.")
|
||||
}
|
||||
|
||||
// Initialize cache
|
||||
if err := cache.NewStore(); err != nil {
|
||||
log.Fatal().Err(err).Msg("An error occurred when initializing cache.")
|
||||
}
|
||||
|
||||
// Set up some workers
|
||||
for idx := 0; idx < viper.GetInt("workers.files_analyze"); idx++ {
|
||||
go services.StartConsumeAnalyzeTask()
|
||||
|
Reference in New Issue
Block a user