Skip to content

Commit

Permalink
[usage] Refactor controller package into scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
easyCZ committed Sep 12, 2022
1 parent bf636f5 commit aa51c3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/ide-metrics/pkg/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func Test_allowListCollector_Reconcile(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := c.Reconcile(tt.args.labels); !reflect.DeepEqual(got, tt.want) {
t.Errorf("allowListCollector.Run() = %v, want %v", got, tt.want)
t.Errorf("allowListCollector.Reconcile() = %v, want %v", got, tt.want)
}
})
}
Expand Down
3 changes: 3 additions & 0 deletions components/usage/pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func Start(cfg Config) error {
jobSpec, err := scheduler.NewLedgerTriggerJobSpec(schedule,
scheduler.NewLedgerTrigger(v1.NewUsageServiceClient(selfConnection), v1.NewBillingServiceClient(selfConnection)),
)
if err != nil {
return fmt.Errorf("failed to setup ledger trigger job: %w", err)
}

sched := scheduler.New(jobSpec)
sched.Start()
Expand Down

0 comments on commit aa51c3b

Please sign in to comment.