Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for NewTimer (0.21 sec)

  1. internal/dsync/dsync_test.go

    	if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) {
    		t.Fatal("GetLock() should be successful")
    	}
    
    	// Make it run twice.
    	timer := time.NewTimer(testDrwMutexRefreshInterval * 2)
    
    	select {
    	case <-ctx.Done():
    		t.Fatal("Lock context canceled which is not expected")
    	case <-timer.C:
    	}
    
    	// Should be safe operation in all cases
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  2. internal/http/server.go

    		}
    		return interval
    	}
    
    	// Wait for opened connection to be closed up to Shutdown timeout.
    	shutdownTimeout := srv.ShutdownTimeout
    	shutdownTimer := time.NewTimer(shutdownTimeout)
    	defer shutdownTimer.Stop()
    
    	timer := time.NewTimer(nextPollInterval())
    	defer timer.Stop()
    	for {
    		select {
    		case <-shutdownTimer.C:
    			if atomic.LoadInt32(&srv.requestCount) <= 0 {
    				return nil
    			}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. cmd/license-update.go

    			}
    			time.Sleep(duration)
    		}
    	}()
    }
    
    func licenceUpdaterLoop(ctx context.Context, objAPI ObjectLayer) {
    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	licenseUpdateTimer := time.NewTimer(licUpdateCycle)
    	defer licenseUpdateTimer.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-licenseUpdateTimer.C:
    
    			if globalSubnetConfig.Registered() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  4. cmd/admin-heal-ops.go

    }
    
    func (ahs *allHealState) periodicHealSeqsClean(ctx context.Context) {
    	// Launch clean-up routine to remove this heal sequence (after
    	// it ends) from the global state after timeout has elapsed.
    	periodicTimer := time.NewTimer(time.Minute * 5)
    	defer periodicTimer.Stop()
    
    	for {
    		select {
    		case <-periodicTimer.C:
    			now := UTCNow()
    			ahs.Lock()
    			for path, h := range ahs.healSeqMap {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
  5. cmd/tier.go

    	randInterval := func() time.Duration {
    		return time.Duration(r.Float64() * 5 * float64(time.Second))
    	}
    
    	// To avoid all MinIO nodes reading the tier config object at the same
    	// time.
    	t := time.NewTimer(tierCfgRefresh + randInterval())
    	defer t.Stop()
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-t.C:
    			err := config.Reload(ctx, objAPI)
    			if err != nil {
    				tierLogIf(ctx, err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  6. cmd/bucket-targets.go

    	}
    	clnt.SetCustomTransport(globalRemoteTargetTransport)
    	return clnt
    }
    
    // heartBeat performs liveness check on remote endpoints.
    func (sys *BucketTargetSys) heartBeat(ctx context.Context) {
    	hcTimer := time.NewTimer(defaultHealthCheckDuration)
    	defer hcTimer.Stop()
    	for {
    		select {
    		case <-hcTimer.C:
    			sys.hMutex.RLock()
    			eps := make([]madmin.ServerProperties, 0, len(sys.hc))
    			for _, ep := range sys.hc {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  7. cmd/metrics-resource.go

    func startResourceMetricsCollection() {
    	initLatestValues()
    
    	resourceMetricsMapMu.Lock()
    	resourceMetricsMap = map[MetricSubsystem]ResourceMetrics{}
    	resourceMetricsMapMu.Unlock()
    	metricsTimer := time.NewTimer(resourceMetricsCollectionInterval)
    	defer metricsTimer.Stop()
    
    	collectLocalResourceMetrics()
    
    	for {
    		select {
    		case <-GlobalContext.Done():
    			return
    		case <-metricsTimer.C:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  8. cmd/bucket-replication.go

    // PersistToDisk persists in-memory resync metadata stats to disk at periodic intervals
    func (s *replicationResyncer) PersistToDisk(ctx context.Context, objectAPI ObjectLayer) {
    	resyncTimer := time.NewTimer(resyncTimeInterval)
    	defer resyncTimer.Stop()
    
    	// For each bucket name, store the last timestamp of the
    	// successful save of replication status in the backend disks.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  9. cmd/erasure-server-pool-rebalance.go

    		// time.
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		randSleepFor := func() time.Duration {
    			return 5*time.Second + time.Duration(float64(5*time.Second)*r.Float64())
    		}
    
    		timer := time.NewTimer(randSleepFor())
    		defer timer.Stop()
    
    		var (
    			quit     bool
    			traceMsg string
    		)
    
    		for {
    			select {
    			case rebalErr := <-doneCh:
    				quit = true
    				now := time.Now()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  10. cmd/callhome.go

    	if err != nil {
    		// lock timedout means some other node is the leader,
    		// cycle back return 'true'
    		return true
    	}
    
    	ctx = lkctx.Context()
    	defer locker.Unlock(lkctx)
    
    	callhomeTimer := time.NewTimer(globalCallhomeConfig.FrequencyDur())
    	defer callhomeTimer.Stop()
    
    	for {
    		if !globalCallhomeConfig.Enabled() {
    			// Stop the processing as callhome got disabled
    			return false
    		}
    
    		select {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.1K bytes
    - Viewed (1)
Back to top