diff --git a/cmd/watcher/main.go b/cmd/watcher/main.go index 3abad58..2960139 100644 --- a/cmd/watcher/main.go +++ b/cmd/watcher/main.go @@ -6,6 +6,8 @@ import ( "github.com/kcotugno/tacitus/ops" "github.com/kcotugno/tacitus/osutil" "github.com/kcotugno/tacitus/postgres" + + "time" ) func main() { @@ -35,6 +37,12 @@ func main() { return } + a := ops.Aggregator{} + a.Database = db + a.Logger = logger + a.Products = []string{"ETH-USD", "BTC-USD"} + a.Start(30 * time.Second) + v := validator{} v.db = db v.logger = logger diff --git a/ops/aggregator.go b/ops/aggregator.go index 56e0d38..963fb51 100644 --- a/ops/aggregator.go +++ b/ops/aggregator.go @@ -83,6 +83,8 @@ func (a *Aggregator) aggregate(product string, interval time.Duration) { if err != nil { a.Logger.Info(`aggregator: database error="%v"`, err) } + + a.Logger.Info(`aggregator: DONE product="%v" interval="%v"`, product, interval) } func (a *Aggregator) Stop() {