check_hash_storage.go 389 B

12345678910111213141516171819
  1. package job
  2. import (
  3. "x-ui/web/service"
  4. )
  5. type CheckHashStorageJob struct {
  6. tgbotService service.Tgbot
  7. }
  8. func NewCheckHashStorageJob() *CheckHashStorageJob {
  9. return new(CheckHashStorageJob)
  10. }
  11. // Here Run is an interface method of the Job interface
  12. func (j *CheckHashStorageJob) Run() {
  13. // Remove expired hashes from storage
  14. j.tgbotService.GetHashStorage().RemoveExpiredHashes()
  15. }