Add job for monitoring bw limit status of tokens
This commit is contained in:
@@ -111,8 +111,8 @@ func MainApp(configPath string) {
|
||||
)
|
||||
|
||||
workerCount := config.GetNumberOfWorkers()
|
||||
if workerCount < 10 {
|
||||
workerCount = 10
|
||||
if workerCount < 20 {
|
||||
workerCount = 20
|
||||
}
|
||||
workerPool, err := ants.NewPool(workerCount)
|
||||
if err != nil {
|
||||
@@ -129,6 +129,7 @@ func MainApp(configPath string) {
|
||||
config,
|
||||
log.Named("realdebrid"),
|
||||
)
|
||||
rd.MonitorExpiredTokens()
|
||||
|
||||
premium.MonitorPremiumStatus(
|
||||
workerPool,
|
||||
@@ -153,6 +154,7 @@ func MainApp(configPath string) {
|
||||
)
|
||||
|
||||
downloader := universal.NewDownloader(rd, workerPool)
|
||||
downloader.StartResetBandwidthCountersJob()
|
||||
|
||||
router := chi.NewRouter()
|
||||
handlers.AttachHandlers(
|
||||
|
||||
Reference in New Issue
Block a user