forked from cerc-io/ipld-eth-server
Remove injection of fetcher and repository to watcher
This commit is contained in:
@@ -17,8 +17,6 @@ package cmd
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
shared2 "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/libraries/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers"
|
||||
@@ -47,9 +45,7 @@ func backfillMakerLogs() {
|
||||
log.Fatal("Failed to initialize database.")
|
||||
}
|
||||
|
||||
repository := &shared2.Repository{}
|
||||
fetcher := shared2.NewFetcher(blockChain)
|
||||
watcher := shared.NewWatcher(db, fetcher, repository)
|
||||
watcher := shared.NewWatcher(db, blockChain)
|
||||
|
||||
watcher.AddTransformers(transformers.TransformerInitializers())
|
||||
err = watcher.Execute()
|
||||
|
||||
@@ -58,12 +58,9 @@ func syncMakerLogs() {
|
||||
log.Fatal("Failed to initialize database.")
|
||||
}
|
||||
|
||||
fetcher := shared2.NewFetcher(blockChain)
|
||||
repository := &shared2.Repository{}
|
||||
|
||||
initializers := getTransformerInitializers(transformerNames)
|
||||
|
||||
watcher := shared.NewWatcher(db, fetcher, repository)
|
||||
watcher := shared.NewWatcher(db, blockChain)
|
||||
watcher.AddTransformers(initializers)
|
||||
|
||||
for range ticker.C {
|
||||
|
||||
Reference in New Issue
Block a user