-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
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
feat(bcs-bscp): feedserver support sync download file api #3122
feat(bcs-bscp): feedserver support sync download file api #3122
Conversation
9c118b1
to
435c36d
Compare
@@ -130,3 +133,20 @@ func (c *client) BatchUpsertClientMetrics(kt *kit.Kit, clientData []*pbclient.Cl | |||
} | |||
return nil | |||
} | |||
|
|||
func (c *client) GetAsyncDownloadTask(kt *kit.Kit, bizID uint32, taskID string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里怎么没有lint错误
@@ -202,6 +208,8 @@ func (fs *feedServer) finalizer() { | |||
return | |||
} | |||
|
|||
fs.cleaner.Stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要defer stop么? 看上面已经return了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我把这个移到上面就行了
return r, nil | ||
} | ||
|
||
func (s *Service) getAsyncDownloadClientInfo(ctx context.Context, req *pbfs.AsyncDownloadReq) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Id / ID 不好混用,看看以前是用那个,保持统一下, BKAgentId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该是没有混用,所有我们自己定义的都是 XxxID,XxxId 这种是 proto 生成的
k8s.io/klog/v2 v2.110.1 | ||
) | ||
|
||
require ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indirect 合并下
"download_speed": 0, | ||
"tasks": []map[string]interface{}{ | ||
{ | ||
"source": map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉这里可以用struct封装下, source, target是一个, agent是一个
|
||
func (s *Service) checkAndDownloadFile(kit *kit.Kit, filePath, signature string) error { | ||
// block until file download | ||
s.fileLock.Lock(filePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只对文件路径加锁,不同业务,app文件路径一样,内容不一样,加锁是不是不符合预期?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的文件路径是这样的:
/data/gse/source/files/{bizID}/{sha256}
No description provided.