added CET timezone
This commit is contained in:
@@ -257,8 +257,11 @@ func (c *Cache) reInsertTorrent(ct *CachedTorrent) (*CachedTorrent, error) {
|
|||||||
return ct, nil
|
return ct, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cache) resetInvalidLinks() {
|
func (c *Cache) resetInvalidLinks(ctx context.Context) {
|
||||||
c.logger.Debug().Msgf("Resetting accounts")
|
c.logger.Debug().Msgf("Resetting accounts")
|
||||||
c.invalidDownloadLinks = sync.Map{}
|
c.invalidDownloadLinks = sync.Map{}
|
||||||
c.client.Accounts().Reset() // Reset the active download keys
|
c.client.Accounts().Reset() // Reset the active download keys
|
||||||
|
|
||||||
|
// Refresh the download links
|
||||||
|
c.refreshDownloadLinks(ctx)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func (c *Cache) StartSchedule(ctx context.Context) error {
|
|||||||
} else {
|
} else {
|
||||||
// Schedule the job
|
// Schedule the job
|
||||||
if _, err := c.cetScheduler.NewJob(jd, gocron.NewTask(func() {
|
if _, err := c.cetScheduler.NewJob(jd, gocron.NewTask(func() {
|
||||||
c.resetInvalidLinks()
|
c.resetInvalidLinks(ctx)
|
||||||
}), gocron.WithContext(ctx)); err != nil {
|
}), gocron.WithContext(ctx)); err != nil {
|
||||||
c.logger.Error().Err(err).Msg("Failed to create link reset job")
|
c.logger.Error().Err(err).Msg("Failed to create link reset job")
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user