Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing route key naming to match other repos. #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions cmd/pw_router/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"os"
"os/signal"
"plane.watch/lib/clickhouse"
"sync"
"syscall"

"plane.watch/lib/clickhouse"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -119,16 +120,16 @@ func main() {
EnvVars: []string{"SOURCE_ROUTE_KEY"},
},
&cli.StringFlag{
Name: "destination-route-key",
Name: "destination-route-key-low",
Usage: "Name of the routing key to publish significant updates to. (low)",
Value: "location-updates-enriched-reduced",
EnvVars: []string{"DEST_ROUTE_KEY"},
EnvVars: []string{"DEST_ROUTE_KEY_LOW"},
},
&cli.StringFlag{
Name: "destination-route-key-merged",
Name: "destination-route-key-high",
Usage: "Name of the routing key to publish merged updates to. (high)",
Value: "location-updates-enriched-merged",
EnvVars: []string{"DEST_ROUTE_KEY"},
EnvVars: []string{"DEST_ROUTE_KEY_HIGH"},
},
&cli.IntFlag{
Name: "num-workers",
Expand Down Expand Up @@ -240,16 +241,16 @@ func run(c *cli.Context) error {
monitoring.AddHealthCheck(router)

numWorkers := c.Int("num-workers")
destRouteKeyLow := c.String("destination-route-key")
destRouteKeyMerged := c.String("destination-route-key-merged")
destRouteKeyLow := c.String("destination-route-key-low")
destRouteKeyHigh := c.String("destination-route-key-high")
spreadUpdates := c.Bool("spread-updates")

log.Info().Msgf("Starting with %d workers...", numWorkers)
for i := 0; i < numWorkers; i++ {
wkr := worker{
router: &router,
destRoutingKeyLow: destRouteKeyLow,
destRoutingKeyHigh: destRouteKeyMerged,
destRoutingKeyHigh: destRouteKeyHigh,
spreadUpdates: spreadUpdates,
ds: ds,
}
Expand Down
Loading