Documentation ¶
Index ¶
- Constants
- type Dao
- func (d *Dao) Close()
- func (d *Dao) DownGradeRecall(c context.Context) (response *recsys.RecsysResponse, err error)
- func (d *Dao) GetUserBlack(c context.Context, mid int64, u *model.UserProfile) (err error)
- func (d *Dao) GetUserFollow(c context.Context, mid int64, u *model.UserProfile) (err error)
- func (d *Dao) InitModel(c context.Context, weights map[string]float64) (err error)
- func (d *Dao) InitUserProfile(c context.Context, mid int64, buvid string) (u *model.UserProfile)
- func (d *Dao) LastPageRedisKey(mid int64, buvid string) (key string)
- func (d *Dao) LastUpsPageRedisKey(mid int64, buvid string) (key string)
- func (d *Dao) LoadUserProfile(c context.Context, mid int64, buvid string) (userProfile *model.UserProfile, err error)
- func (d *Dao) ParallelRedis(tasks *[]parallel.RedisTask) *[]workpool.FutureTask
- func (d *Dao) Ping(c context.Context) error
- func (d *Dao) StoreRecResults(c context.Context, u *model.UserProfile, mid int64, buvid string, ...) (err error)
- func (d *Dao) WriteBF(c context.Context, mid int64, buvid string, svid []uint64) (bool, error)
Constants ¶
View Source
const ( TaskLastPage = "TaskLastPage" TaskLastUpsPage = "TaskLastUpsPage" TaskBiliUserProfile = "TaskBiliUserProfile" TaskBBQUserProfile = "TaskBBQUserProfile" TaskBBQDeviceProfile = "TaskBBQDeviceProfile" TaskUserLike = "TaskUserLike" TaskUserLikeYesterday = "TaskUserLikeYesterday" TaskUserPlay = "TaskUserPlay" TaskUserPlayYesterday = "TaskUserPlayYesterday" TaskDevicePlay = "TaskDevicePlay" TaskDevicePlayYesterday = "TaskDevicePlayYesterday" TaskUserFollow = "TaskUserFollow" TaskUserFollowYesterday = "TaskUserFollowYesterday" )
user const
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct { SearchClient searchv1.SearchClient RecallClient recallv1.RecsysRecallClient UserClient user.UserClient RelationClient relation.RelationClient // contains filtered or unexported fields }
Dao dao
func (*Dao) DownGradeRecall ¶
DownGradeRecall ...
func (*Dao) GetUserBlack ¶
GetUserBlack ...
func (*Dao) GetUserFollow ¶
GetUserFollow ...
func (*Dao) InitUserProfile ¶
InitUserProfile ...
func (*Dao) LastPageRedisKey ¶
LastPageRedisKey for main rec process
func (*Dao) LastUpsPageRedisKey ¶
LastUpsPageRedisKey for ups rec process
func (*Dao) LoadUserProfile ¶
func (d *Dao) LoadUserProfile(c context.Context, mid int64, buvid string) (userProfile *model.UserProfile, err error)
LoadUserProfile load user info from redis parallel
func (*Dao) ParallelRedis ¶
func (d *Dao) ParallelRedis(tasks *[]parallel.RedisTask) *[]workpool.FutureTask
ParallelRedis run redis cmd parallel
func (*Dao) StoreRecResults ¶
func (d *Dao) StoreRecResults(c context.Context, u *model.UserProfile, mid int64, buvid string, response *recsys.RecsysResponse, getKeyFunc func(int64, string) string, lastRecords []model.Record4Dup) (err error)
StoreRecResults store rec or upsRec history according to getKeyFunc
Source Files ¶
Click to show internal directories.
Click to hide internal directories.