diff options
| author | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-20 18:59:28 +0300 |
|---|---|---|
| committer | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-20 18:59:28 +0300 |
| commit | 8c5648eb09b0d6d1479f102156e8a548ed478caa (patch) | |
| tree | 79f9bef907105c54c49ffde81f9808f260fbdf00 /web/job | |
| parent | 4dfe527f203cbae9b90e77e876fcfd90803bcb26 (diff) | |
FIX callback query and BUTTON_DATA_INVALID error with hashStorage
Diffstat (limited to 'web/job')
| -rw-r--r-- | web/job/check_hash_storage.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/web/job/check_hash_storage.go b/web/job/check_hash_storage.go new file mode 100644 index 00000000..468aa2e0 --- /dev/null +++ b/web/job/check_hash_storage.go @@ -0,0 +1,19 @@ +package job + +import ( + "x-ui/web/service" +) + +type CheckHashStorageJob struct { + tgbotService service.Tgbot +} + +func NewCheckHashStorageJob() *CheckHashStorageJob { + return new(CheckHashStorageJob) +} + +// Here Run is an interface method of the Job interface +func (j *CheckHashStorageJob) Run() { + // Remove expired hashes from storage + j.tgbotService.GetHashStorage().RemoveExpiredHashes() +} |
