func (c *Cache) Start() { mlog.Info("Starting service Cache ...") c.mailbox = c.register(c.bus, "/command/movie/cache", c.cacheMovie) c.pool = lib.NewPool(4, 2000) go c.react() }
func (s *Scraper) Start() { mlog.Info("Starting service Scraper ...") var err error s.tmdb, err = tmdb.NewClient("e610ded10c3f47d05fe797961d90fea6", false) if err != nil { mlog.Fatalf("Unable to create tmdb client: %s", err) } s.mailbox = s.register(s.bus, "/command/movie/scrape", s.scrapeMovie) s.registerAdditional(s.bus, "/command/movie/rescrape", s.reScrapeMovie, s.mailbox) s.registerAdditional(s.bus, "/event/config/changed", s.configChanged, s.mailbox) s.pool = lib.NewPool(12, 4000) go s.react() }