From 39f941c771d723ace1fb9cfe167ad6389a934fff Mon Sep 17 00:00:00 2001 From: travisturner Date: Wed, 11 Dec 2013 11:00:47 -0600 Subject: [PATCH] push port from config file into Cruncher.Run() --- core/cruncher.go | 5 ++++- core/service.go | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/cruncher.go b/core/cruncher.go index 1e2af8684..6fe94108d 100644 --- a/core/cruncher.go +++ b/core/cruncher.go @@ -8,6 +8,9 @@ import ( type Cruncher struct { } -func (cruncher *Cruncher) Run() { +func (cruncher *Cruncher) Run(port int) { + spew.Dump("Cruncher.Run") + spew.Dump(port) + } diff --git a/core/service.go b/core/service.go index 90b62b3de..0c7c5cc10 100644 --- a/core/service.go +++ b/core/service.go @@ -15,6 +15,7 @@ import ( //"flag" //"encoding/gob" //"io" + "pilosa/config" ) type Stats struct { @@ -308,7 +309,7 @@ func (service *Service) Run() { //go service.HandleInbox() //go service.ServeHTTP() go service.MetaWatcher() - go service.Cruncher.Run() + go service.Cruncher.Run(config.GetInt("port_tcp")) sigterm, sighup := service.GetSignals() for {