1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refactor: move more background jobs to using job queue

This commit is contained in:
Ferdinand Mütsch
2022-11-20 10:10:24 +01:00
parent e2ef54152d
commit fcca881cfc
9 changed files with 179 additions and 156 deletions

View File

@@ -8,7 +8,7 @@ import (
type IAggregationService interface {
Schedule()
Run(set datastructure.Set[string]) error
AggregateSummaries(set datastructure.Set[string]) error
}
type IMiscService interface {
@@ -97,8 +97,8 @@ type IReportService interface {
}
type ILeaderboardService interface {
ScheduleDefault()
Run([]*models.User, *models.IntervalKey, []uint8) error
Schedule()
ComputeLeaderboard([]*models.User, *models.IntervalKey, []uint8) error
ExistsAnyByUser(string) (bool, error)
CountUsers() (int64, error)
GetByInterval(*models.IntervalKey, *models.PageParams, bool) (models.Leaderboard, error)