MCPcopy Index your code
hub / github.com/deepflowio/deepflow / startDomainRefreshMonitor

Method startDomainRefreshMonitor

server/controller/manager/task.go:92–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92func (t *Task) startDomainRefreshMonitor() {
93 go func() {
94 LOOP:
95 for {
96 log.Infof("task (%s) wait for next refresh", t.DomainName, t.LogPrefixORGID)
97 t.domainRefreshSignal.Get()
98 log.Infof("task (%s) call recorder refresh", t.DomainName, t.LogPrefixORGID)
99 if err := t.Recorder.Refresh(recorder.RefreshTargetDomain, t.Cloud.GetResource()); err != nil {
100 if errors.Is(err, recorder.RefreshConflictError) {
101 log.Warningf("task (%s) refresh conflict, retry after 5 seconds", t.DomainName, t.LogPrefixORGID)
102 t.domainRefreshSignal.Put(struct{}{})
103 time.Sleep(time.Duration(recorderRefreshTryInterval) * time.Second)
104 } else {
105 log.Warningf("task (%s) refresh failed: %s", t.DomainName, err.Error(), t.LogPrefixORGID)
106 }
107 }
108
109 select {
110 case <-t.tCtx.Done():
111 break LOOP
112 default:
113 }
114
115 log.Infof("task (%s) one loop over", t.DomainName, t.LogPrefixORGID)
116 }
117 }()
118}
119
120func (t *Task) startSubDomainRefreshMonitor() {
121 go func() {

Callers 1

StartMethod · 0.95

Calls 7

GetMethod · 0.65
RefreshMethod · 0.65
PutMethod · 0.65
ErrorMethod · 0.65
InfofMethod · 0.45
GetResourceMethod · 0.45
WarningfMethod · 0.45

Tested by

no test coverage detected