MCPcopy
hub / github.com/flyteorg/flyte / enqueueLoop

Method enqueueLoop

flytestdlib/autorefreshcache/auto_refresh.go:177–193  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

175}
176
177func (w *autoRefresh) enqueueLoop(ctx context.Context) {
178 timer := w.clock.NewTimer(w.syncPeriod)
179 defer timer.Stop()
180
181 for {
182 select {
183 case <-ctx.Done():
184 return
185 case <-timer.C():
186 err := w.enqueueBatches(ctx)
187 if err != nil {
188 logger.Errorf(ctx, "Failed to enqueue. Error: %v", err)
189 }
190 timer.Reset(w.syncPeriod)
191 }
192 }
193}
194
195// Update updates the item only if it exists in the cache and is not terminal,
196// return true if we updated the item.

Callers 1

StartMethod · 0.95

Calls 4

StopMethod · 0.95
enqueueBatchesMethod · 0.95
ErrorfFunction · 0.92
ResetMethod · 0.65

Tested by

no test coverage detected