all repos — searchix @ 63599c719d8e4e09548546bb366a849ef40c602b

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: add low-memory mode

Alan Pearce
commit

63599c719d8e4e09548546bb366a849ef40c602b

parent

789d0079f84017ddafad763ffba9aadbcd6aa6da

1 file changed, 5 insertions(+), 4 deletions(-)

changed files
M internal/config/default.gointernal/config/default.go
@@ -18,7 +18,7 @@ const self = "'self'"
const maxAge = (1 * 365 * 24 * time.Hour) -var defaultConfig = Config{ +var DefaultConfig = Config{ DataPath: "./data", Web: &Web{ ListenAddress: "localhost",
@@ -47,8 +47,9 @@ "x-frame-options": "DENY",
}, }, Importer: &Importer{ - Timeout: Duration{30 * time.Minute}, - UpdateAt: mustLocalTime("04:00:00"), + LowMemory: false, + Timeout: Duration{30 * time.Minute}, + UpdateAt: mustLocalTime("04:00:00"), Sources: map[string]*Source{ "nixos": { Name: "NixOS",
@@ -116,7 +117,7 @@ },
} func GetDefaultConfig() string { - out, err := toml.Marshal(&defaultConfig) + out, err := toml.Marshal(&DefaultConfig) if err != nil { panic("could not read default configuration") }