diff --git a/server/gameservice/task/seasonRanking.go b/server/gameservice/task/seasonRanking.go index 8e1e6fe1..17894243 100644 --- a/server/gameservice/task/seasonRanking.go +++ b/server/gameservice/task/seasonRanking.go @@ -50,8 +50,8 @@ func (this *SeasonRankMgr) CalcRanking() { func (this *SeasonRankMgr) goGetUsersRecords() { userData := make(map[int64]*userDb) var lastIdx int64 = 0 - task := f5.NewTask( - func (task *f5.Task) { + f5.NewAsyncTask( + func (task *f5.AsyncTask) { sql := fmt.Sprintf("SELECT * FROM t_user WHERE idx > %d AND score > %d LIMIT %d", lastIdx, constant.BASE_SCORE, @@ -82,13 +82,16 @@ func (this *SeasonRankMgr) goGetUsersRecords() { } if rows.NumOfReaded() <= 0 { task.SetSucc() + } else { + task.Continue() } }, ) + }).OnSucc( + func (task* f5.AsyncTask) { + }).OnFail( + func (task* f5.AsyncTask) { }) - if task.IsSucc() { - - } } func (this *SeasonRankMgr) pushRankingResult() { diff --git a/third_party/f5 b/third_party/f5 index 003e5247..b6f20e68 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 003e5247c7c3d299352b72bdf6b0d620bf9bd453 +Subproject commit b6f20e6837ac50d25fd84c1985e8c92f669f27a6