feat: implement group filter management with caching and database integration

This commit is contained in:
Fd
2026-07-20 15:33:15 +07:00
parent a4914b3dfa
commit f6e6d4eb59
7 changed files with 239 additions and 16 deletions
+8
View File
@@ -8,7 +8,9 @@ import (
"syscall"
_ "neo/cmds"
"neo/cmds/group"
"neo/core"
"neo/database"
"github.com/davidbyttow/govips/v2/vips"
"github.com/joho/godotenv"
@@ -37,6 +39,12 @@ func main() {
vips.Startup(nil)
defer vips.Shutdown()
go func() {
database.InitDB(os.Getenv("SQLITE_PATH"))
database.AutoMigrate()
group.LoadCache()
}()
dbLog := waLog.Stdout("Database", "DEBUG", true)
ctx := context.Background()
container, err := sqlstore.New(ctx, "sqlite3", fmt.Sprintf("file:%s?_foreign_keys=on", os.Getenv("SESSION_PATH")), dbLog)