Add job for monitoring bw limit status of tokens
This commit is contained in:
@@ -13,6 +13,7 @@ const (
|
||||
MINIMUM_SLEEP = 60 // 60 seconds
|
||||
)
|
||||
|
||||
// MonitorPremiumStatus is a permanent job that monitors the premium status of the user
|
||||
func MonitorPremiumStatus(workerPool *ants.Pool, rd *realdebrid.RealDebrid, zurglog *logutil.Logger) {
|
||||
var userInfo *realdebrid.User
|
||||
var err error
|
||||
@@ -52,8 +53,7 @@ func MonitorPremiumStatus(workerPool *ants.Pool, rd *realdebrid.RealDebrid, zurg
|
||||
userInfo, err = rd.GetUserInformation()
|
||||
if err != nil {
|
||||
zurglog.Errorf("Failed to get user information: %v", err)
|
||||
time.Sleep(5 * time.Minute)
|
||||
continue
|
||||
time.Sleep(time.Duration(MINIMUM_SLEEP) * time.Second)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user