Skip to content

Commit 3f7c12b

Browse files
undo changes
1 parent 29ebb7d commit 3f7c12b

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

changes/20250602113846.feature

Lines changed: 0 additions & 1 deletion
This file was deleted.

utils/subprocess/supervisor/interface.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ import "context"
99
type ISupervisor interface {
1010
// Run will run the supervisor and execute any of the command hooks. If it receives a halting error or the context is cancelled then it will exit
1111
Run(ctx context.Context) error
12-
Stop() error
1312
}

utils/subprocess/supervisor/supervisor.go

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,7 @@ func (s *Supervisor) Run(ctx context.Context) (err error) {
129129
return fmt.Errorf("%w: command was undefined", commonerrors.ErrUndefined)
130130
}
131131

132-
g.Go(s.cmd.Start)
133-
for !s.cmd.IsOn() { // wait for job to start
134-
if err := parallelisation.DetermineContextError(ctx); err != nil {
135-
break
136-
}
137-
parallelisation.SleepWithContext(ctx, 200*time.Millisecond)
138-
}
139-
for s.cmd.IsOn() { // wait for job to end
140-
if err := parallelisation.DetermineContextError(ctx); err != nil {
141-
break
142-
}
143-
parallelisation.SleepWithContext(ctx, 200*time.Millisecond)
144-
}
145-
146-
fmt.Println(1234456)
132+
g.Go(s.cmd.Execute)
147133

148134
if s.postStart != nil {
149135
err = s.postStart(ctx)
@@ -183,10 +169,3 @@ func (s *Supervisor) Run(ctx context.Context) (err error) {
183169

184170
return
185171
}
186-
187-
func (s *Supervisor) Stop() error {
188-
if s.cmd == nil {
189-
return nil
190-
}
191-
return s.cmd.Interrupt()
192-
}

0 commit comments

Comments
 (0)