We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github.com/gogf/gf/contrib/registry/file/[email protected]/file_discovery.go 的97行代码会误删其他服务的注册文件
The text was updated successfully, but these errors were encountered:
os.RemoveAll(path)
for _, filePath := range filePaths { s, e := r.getServiceByFilePath(filePath) if e != nil { return nil, e } // Check service TTL. var ( updateAt = s.GetMetadata().Get(updateAtKey).GTime() nowTime = gtime.Now() subDuration = nowTime.Sub(updateAt) ) if updateAt.IsZero() || subDuration > serviceTTL { g.Log().Debugf( ctx, `service "%s" is expired, update at: %s, current: %s, sub duration: %s`, s.GetKey(), updateAt.String(), nowTime.String(), subDuration.String(), ) _ = gfile.Remove(filePath) continue } services = append(services, s) }
这里的 filePath不是一个文件路径,是一个目录路径?
filePath
Sorry, something went wrong.
No branches or pull requests
github.com/gogf/gf/contrib/registry/file/[email protected]/file_discovery.go 的97行代码会误删其他服务的注册文件
The text was updated successfully, but these errors were encountered: