From ee04951f0e471864bcfa338d07ab6a82dc20b660 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 9 Mar 2018 04:32:31 +0100 Subject: [PATCH] Fixed import script --- jobs/mal-import/mal-import.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/jobs/mal-import/mal-import.go b/jobs/mal-import/mal-import.go index d6f7907a..a2d89c2f 100644 --- a/jobs/mal-import/mal-import.go +++ b/jobs/mal-import/mal-import.go @@ -8,17 +8,12 @@ import ( "path/filepath" "strings" - "github.com/animenotifier/mal" - - "github.com/aerogo/nano" + "github.com/animenotifier/arn" "github.com/animenotifier/mal/parser" ) -var node = nano.New(5000) -var db = node.Namespace("mal").RegisterTypes((*mal.Anime)(nil)) - func main() { - defer node.Close() + defer arn.Node.Close() // readFile("../mal-crawler/files/anime-31240.html") @@ -61,7 +56,7 @@ func readFile(name string) error { } fmt.Println(anime.ID, anime.Title) - db.Set("Anime", anime.ID, anime) + arn.MAL.Set("Anime", anime.ID, anime) return nil }