Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 899ca015b1 |
@@ -218,7 +218,7 @@ func runDaemon(ctx context.Context, daemArgs *daemonArgs, configFile *string) fu
|
||||
}
|
||||
}()
|
||||
|
||||
poller := poll.New(ctx, cfg, cli, runner)
|
||||
poller := poll.New(cfg, cli, runner)
|
||||
poller.SetBandwidthManager(bandwidthManager)
|
||||
|
||||
if daemArgs.Once || reg.Ephemeral {
|
||||
|
||||
@@ -40,11 +40,11 @@ type Poller struct {
|
||||
done chan struct{}
|
||||
}
|
||||
|
||||
// New creates a new Poller instance with the given context for shutdown propagation.
|
||||
func New(ctx context.Context, cfg *config.Config, client client.Client, runner *run.Runner) *Poller {
|
||||
// Inherit from parent context so shutdown signals propagate properly
|
||||
pollingCtx, shutdownPolling := context.WithCancel(ctx)
|
||||
jobsCtx, shutdownJobs := context.WithCancel(ctx)
|
||||
// New creates a new Poller instance.
|
||||
func New(cfg *config.Config, client client.Client, runner *run.Runner) *Poller {
|
||||
// Use independent contexts - shutdown is handled explicitly via Shutdown()
|
||||
pollingCtx, shutdownPolling := context.WithCancel(context.Background())
|
||||
jobsCtx, shutdownJobs := context.WithCancel(context.Background())
|
||||
|
||||
done := make(chan struct{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user