mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-13 17:46:02 +00:00
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
21 lines
611 B
Go
21 lines
611 B
Go
package job
|
|
|
|
import (
|
|
"github.com/mhsanaei/3x-ui/v3/web/service"
|
|
)
|
|
|
|
// CheckHashStorageJob periodically cleans up expired hash entries from the Telegram bot's hash storage.
|
|
type CheckHashStorageJob struct {
|
|
tgbotService service.Tgbot
|
|
}
|
|
|
|
// NewCheckHashStorageJob creates a new hash storage cleanup job instance.
|
|
func NewCheckHashStorageJob() *CheckHashStorageJob {
|
|
return new(CheckHashStorageJob)
|
|
}
|
|
|
|
// Run removes expired hash entries from the Telegram bot's hash storage.
|
|
func (j *CheckHashStorageJob) Run() {
|
|
// Remove expired hashes from storage
|
|
j.tgbotService.GetHashStorage().RemoveExpiredHashes()
|
|
}
|