MCPcopy Create free account
hub / github.com/bytebase/bytebase / Run

Method Run

backend/runner/taskrun/rollout_creator.go:35–48  ·  view source on GitHub ↗

Run starts the rollout creator listening to the channel.

(ctx context.Context, wg *sync.WaitGroup, rolloutCreationChan chan bus.PlanRef)

Source from the content-addressed store, hash-verified

33
34// Run starts the rollout creator listening to the channel.
35func (rc *RolloutCreator) Run(ctx context.Context, wg *sync.WaitGroup, rolloutCreationChan chan bus.PlanRef) {
36 defer wg.Done()
37 slog.Debug("Rollout creator started")
38
39 for {
40 select {
41 case ref := <-rolloutCreationChan:
42 rc.tryCreateRollout(ctx, ref)
43 case <-ctx.Done():
44 slog.Debug("Rollout creator stopped")
45 return
46 }
47 }
48}
49
50// tryCreateRollout attempts to create a rollout for the given plan.
51func (rc *RolloutCreator) tryCreateRollout(ctx context.Context, ref bus.PlanRef) {

Callers 1

RunMethod · 0.95

Calls 2

tryCreateRolloutMethod · 0.95
DebugMethod · 0.80

Tested by

no test coverage detected