You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

check_cache.go 560 B

1234567891011121314151617181920212223242526
  1. package tickevent
  2. import (
  3. "gitlink.org.cn/cloudream/common/utils/logger"
  4. mysql "gitlink.org.cn/cloudream/db/sql"
  5. "gitlink.org.cn/cloudream/scanner/internal/event"
  6. )
  7. type CheckCache struct {
  8. }
  9. func NewCheckCache() *CheckCache {
  10. return &CheckCache{}
  11. }
  12. func (e *CheckCache) Execute(ctx ExecuteContext) {
  13. nodes, err := mysql.Node.GetAllNodes(ctx.Args.DB.SQLCtx())
  14. if err != nil {
  15. logger.Warnf("get all nodes failed, err: %s", err.Error())
  16. return
  17. }
  18. for _, node := range nodes {
  19. ctx.Args.EventExecutor.Post(event.NewCheckCache(node.NodeID))
  20. }
  21. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。