Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: wenfeng <[email protected]>
  • Loading branch information
wenfengwang committed Dec 19, 2022
1 parent 3c55d1b commit 7a73f85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions internal/controller/trigger/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,24 +514,25 @@ func (ctrl *controller) initTriggerSystemEventbus() {
ctx := context.Background()
log.Info(ctx, "trigger controller is ready to check system eventbus", nil)
if err := ctrl.cl.WaitForControllerReady(true); err != nil {
log.Error(context.Background(), "trigger controller try to create system eventbus, "+
log.Error(ctx, "trigger controller try to create system eventbus, "+
"but Vanus cluster hasn't ready, exit", nil)
os.Exit(-1)
}

if err := ctrl.cl.EventbusService().CreateSystemEventbusIfNotExist(ctx, primitive.RetryEventbusName,
"System Eventbus For Trigger Service"); err != nil {
log.Error(context.Background(), "failed to create RetryEventbus, exit", map[string]interface{}{
log.Error(ctx, "failed to create RetryEventbus, exit", map[string]interface{}{
log.KeyError: err,
})
os.Exit(-1)
}

if err := ctrl.cl.EventbusService().CreateSystemEventbusIfNotExist(ctx, primitive.DeadLetterEventbusName,
"System Eventbus For Trigger Service"); err != nil {
log.Error(context.Background(), "failed to create DeadLetterEventbus, exit", map[string]interface{}{
log.Error(ctx, "failed to create DeadLetterEventbus, exit", map[string]interface{}{
log.KeyError: err,
})
os.Exit(-1)
}
log.Info(ctx, "trigger controller has finished for checking system eventbus", nil)
}()
Expand Down
1 change: 0 additions & 1 deletion pkg/cluster/eventbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func (es *eventbusService) CreateSystemEventbusIfNotExist(ctx context.Context, n
return nil
}

// TODO 创建前需要等到Store就绪,而store的就绪在controller之后,创建又在controller就绪过程中
_, err := es.client.CreateSystemEventBus(ctx, &ctrlpb.CreateEventBusRequest{
Name: name,
LogNumber: int32(defaultSystemEventbusEventlog),
Expand Down

0 comments on commit 7a73f85

Please sign in to comment.