- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for NewDeadlineWorker (0.1 sec)
-
cmd/xl-storage-disk-id-check.go
ctx, done, err := p.TrackDiskHealth(ctx, storageMetricMakeVolBulk, volumes...) if err != nil { return err } defer done(0, &err) w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout()) return w.Run(func() error { return p.storage.MakeVolBulk(ctx, volumes...) }) } func (p *xlStorageDiskIDCheck) MakeVol(ctx context.Context, volume string) (err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0) -
internal/ioutil/ioutil.go
} // DeadlineWorker implements the deadline/timeout resiliency pattern. type DeadlineWorker struct { timeout time.Duration } // NewDeadlineWorker constructs a new DeadlineWorker with the given timeout. // To return values, use the WithDeadline helper instead. func NewDeadlineWorker(timeout time.Duration) *DeadlineWorker { dw := &DeadlineWorker{ timeout: timeout, } return dw }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
time.Sleep(w.timeout) return len(p), nil } func (w *sleepWriter) Close() error { return nil } func TestDeadlineWorker(t *testing.T) { work := NewDeadlineWorker(500 * time.Millisecond) err := work.Run(func() error { time.Sleep(600 * time.Millisecond) return nil }) if err != context.DeadlineExceeded {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
cmd/erasure.go
go func(disk StorageAPI) { defer wg.Done() drivePath := disk.Endpoint().Path readDirFn(pathJoin(drivePath, minioMetaTmpDeletedBucket), func(ddir string, typ os.FileMode) error { w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout()) return w.Run(func() error { wait := deleteCleanupSleeper.Timer(ctx) removeAll(pathJoin(drivePath, minioMetaTmpDeletedBucket, ddir)) wait() return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
cmd/erasure-multipart.go
if err != nil { return nil } modTime = fi.ModTime wait() } if time.Since(modTime) < globalAPIConfig.getStaleUploadsExpiry() { return nil } w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout()) return w.Run(func() error { wait := deleteMultipartCleanupSleeper.Timer(ctx) pathUUID := mustGetUUID()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0) -
cmd/xl-storage.go
for { select { case <-ctx.Done(): return case entry := <-s.immediatePurge: // Add deadlines such that immediate purge is not // perpetually hung here. w := xioutil.NewDeadlineWorker(globalDriveConfig.GetMaxTimeout()) w.Run(func() error { return removeAll(entry) }) } } } const almostFilledPercent = 0.05
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0)