Skip to content

Commit

Permalink
Forwarder: fix in AppSync publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed May 17, 2024
1 parent b0568ab commit 789be71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/forward/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ func NewController(config *config.Config) (self *Controller, err error) {
WithInputChannel(appSyncMapper.Output)

return task.NewTask(config, "watched").
WithSubtask(duplicator.Task).
WithSubtask(redisDuplicator.Task).
WithSubtaskSlice(redisPublishers).
WithSubtask(appSyncPublisher.Task).
WithSubtask(appSyncMapper.Task)
WithSubtask(appSyncPublisher.Task)
}

watchdog := task.NewWatchdog(config).
Expand All @@ -112,6 +110,9 @@ func NewController(config *config.Config) (self *Controller, err error) {
WithSubtask(fetcher.Task).
WithSubtask(watchdog.Task).
WithSubtask(interactionStreamer.Task).
WithSubtask(server.Task)
WithSubtask(server.Task).
WithSubtask(duplicator.Task).
WithSubtask(appSyncMapper.Task)

return
}
2 changes: 1 addition & 1 deletion src/utils/config/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func setForwarderDefaults() {
viper.SetDefault("Forwarder.FetcherLastSortKeySettingBlockHeight", "0")
viper.SetDefault("Forwarder.FetcherLastSortKeySettingEnabled", "true")
viper.SetDefault("Forwarder.FetcherBatchSize", "10")
viper.SetDefault("Forwarder.PublisherRedisChannelName", "interactions")
viper.SetDefault("Forwarder.PublisherRedisChannelName", "contracts")
viper.SetDefault("Forwarder.PublisherAppSyncChannelName", "interactions")
viper.SetDefault("Forwarder.HeightDelay", "1s")
viper.SetDefault("Forwarder.ArweaveFetcherQueueSize", "3000")
Expand Down
2 changes: 1 addition & 1 deletion src/utils/publisher/app-sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const mutation = `mutation Publish($data: AWSJSON!, $name: String!) {
}
}`

// Forwards messages to Redis
// Forwards messages to AppSync
type AppSyncPublisher[In encoding.BinaryMarshaler] struct {
*task.Task

Expand Down

0 comments on commit 789be71

Please sign in to comment.