You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
356 B
24 lines
356 B
package service |
|
|
|
import ( |
|
"context" |
|
"time" |
|
) |
|
|
|
func (s *Service) loadOpsCache() { |
|
mcs, err := s.dao.OpsMemcaches(context.Background()) |
|
if err == nil { |
|
s.opsMcs = mcs |
|
} |
|
rds, err := s.dao.OpsRediss(context.Background()) |
|
if err == nil { |
|
s.opsRds = rds |
|
} |
|
} |
|
|
|
func (s *Service) loadOpsproc() { |
|
for { |
|
s.loadOpsCache() |
|
time.Sleep(time.Minute) |
|
} |
|
}
|
|
|