scheduler

package
v0.0.0-...-930562d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewSchedulerModule = fx.Options(
	fx.Provide(NewScheduler),
)

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	CoinHistoricalPriceRepo     repository.CoinHistoricalPriceRepository
	CoinRepo                    repository.CoinRepository
	CoinGeckoService            service.CoinGeckoService
	SlackNotificationRepository repository.SlackNotificationRepository
	RequestLogRepository        repository.RequestLogRepository

	Logger zerolog.Logger
	// contains filtered or unexported fields
}

Scheduler struct to hold repositories and logger

func NewScheduler

func NewScheduler(coinHistoricalPriceRepo repository.CoinHistoricalPriceRepository, coinRepo repository.CoinRepository, slackNotificationRepository repository.SlackNotificationRepository, requestLogsRepository repository.RequestLogRepository, redisClient *shared.RedisClient, logger zerolog.Logger, coinGeckoService service.CoinGeckoService) *Scheduler

NewScheduler creates a new Scheduler

func (*Scheduler) StartCoinHistoricalPriceProcessQueue

func (s *Scheduler) StartCoinHistoricalPriceProcessQueue()

func (*Scheduler) StartCoinsProcessQueue

func (s *Scheduler) StartCoinsProcessQueue()

StartProcessQueue 定时处理队列数据

func (*Scheduler) StartProcessDeleteOldData

func (s *Scheduler) StartProcessDeleteOldData()

func (*Scheduler) StartProcessRequestLogs

func (s *Scheduler) StartProcessRequestLogs()

func (*Scheduler) StartProcessSlackNotifications

func (s *Scheduler) StartProcessSlackNotifications()

func (*Scheduler) StartProcessTopNotifications

func (s *Scheduler) StartProcessTopNotifications()

每分钟释放top10的token

func (*Scheduler) StartSyncCoins

func (s *Scheduler) StartSyncCoins()

func (*Scheduler) StartSyncCoinsCache

func (s *Scheduler) StartSyncCoinsCache()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL