Add new hourly reset traffic

This commit is contained in:
and.smirnov 2026-03-25 23:08:41 +03:00
parent 38d87230d3
commit b6256bbe0b
15 changed files with 17 additions and 0 deletions

View file

@ -81,6 +81,8 @@
<a-select-option value="monthly">{{ i18n <a-select-option value="monthly">{{ i18n
"pages.inbounds.periodicTrafficReset.monthly" "pages.inbounds.periodicTrafficReset.monthly"
}}</a-select-option> }}</a-select-option>
<a-select-option value="hourly">{{ i18n
"pages.inbounds.periodicTrafficReset.hourly" }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>

View file

@ -271,6 +271,7 @@
"daily" = "يومياً" "daily" = "يومياً"
"weekly" = "أسبوعياً" "weekly" = "أسبوعياً"
"monthly" = "شهرياً" "monthly" = "شهرياً"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "تم الحصول عليه" "obtain" = "تم الحصول عليه"

View file

@ -271,6 +271,7 @@
"daily" = "Daily" "daily" = "Daily"
"weekly" = "Weekly" "weekly" = "Weekly"
"monthly" = "Monthly" "monthly" = "Monthly"
"hourly" = "Hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Obtain" "obtain" = "Obtain"

View file

@ -271,6 +271,7 @@
"daily" = "Diariamente" "daily" = "Diariamente"
"weekly" = "Semanalmente" "weekly" = "Semanalmente"
"monthly" = "Mensualmente" "monthly" = "Mensualmente"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Recibir" "obtain" = "Recibir"

View file

@ -271,6 +271,7 @@
"daily" = "روزانه" "daily" = "روزانه"
"weekly" = "هفتگی" "weekly" = "هفتگی"
"monthly" = "ماهانه" "monthly" = "ماهانه"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "فراهم‌سازی" "obtain" = "فراهم‌سازی"

View file

@ -271,6 +271,7 @@
"daily" = "Harian" "daily" = "Harian"
"weekly" = "Mingguan" "weekly" = "Mingguan"
"monthly" = "Bulanan" "monthly" = "Bulanan"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Dapatkan" "obtain" = "Dapatkan"

View file

@ -271,6 +271,7 @@
"daily" = "毎日" "daily" = "毎日"
"weekly" = "毎週" "weekly" = "毎週"
"monthly" = "毎月" "monthly" = "毎月"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "取得" "obtain" = "取得"

View file

@ -271,6 +271,7 @@
"daily" = "Diariamente" "daily" = "Diariamente"
"weekly" = "Semanalmente" "weekly" = "Semanalmente"
"monthly" = "Mensalmente" "monthly" = "Mensalmente"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Obter" "obtain" = "Obter"

View file

@ -271,6 +271,7 @@
"daily" = "Ежедневно" "daily" = "Ежедневно"
"weekly" = "Еженедельно" "weekly" = "Еженедельно"
"monthly" = "Ежемесячно" "monthly" = "Ежемесячно"
"hourly" = "Ежечасно"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Получить" "obtain" = "Получить"

View file

@ -271,6 +271,7 @@
"daily" = "Günlük" "daily" = "Günlük"
"weekly" = "Haftalık" "weekly" = "Haftalık"
"monthly" = "Aylık" "monthly" = "Aylık"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Elde Et" "obtain" = "Elde Et"

View file

@ -271,6 +271,7 @@
"daily" = "Щодня" "daily" = "Щодня"
"weekly" = "Щотижня" "weekly" = "Щотижня"
"monthly" = "Щомісяця" "monthly" = "Щомісяця"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Отримати" "obtain" = "Отримати"

View file

@ -271,6 +271,7 @@
"daily" = "Hàng ngày" "daily" = "Hàng ngày"
"weekly" = "Hàng tuần" "weekly" = "Hàng tuần"
"monthly" = "Hàng tháng" "monthly" = "Hàng tháng"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "Nhận" "obtain" = "Nhận"

View file

@ -271,6 +271,7 @@
"daily" = "每日" "daily" = "每日"
"weekly" = "每周" "weekly" = "每周"
"monthly" = "每月" "monthly" = "每月"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "获取" "obtain" = "获取"

View file

@ -271,6 +271,7 @@
"daily" = "每日" "daily" = "每日"
"weekly" = "每週" "weekly" = "每週"
"monthly" = "每月" "monthly" = "每月"
"hourly" = "hourly"
[pages.inbounds.toasts] [pages.inbounds.toasts]
"obtain" = "獲取" "obtain" = "獲取"

View file

@ -325,6 +325,8 @@ func (s *Server) startTask() {
s.cron.AddJob("@daily", job.NewClearLogsJob()) s.cron.AddJob("@daily", job.NewClearLogsJob())
// Inbound traffic reset jobs // Inbound traffic reset jobs
// Run every hour
s.cron.AddJob("@hourly", job.NewPeriodicTrafficResetJob("hourly"))
// Run once a day, midnight // Run once a day, midnight
s.cron.AddJob("@daily", job.NewPeriodicTrafficResetJob("daily")) s.cron.AddJob("@daily", job.NewPeriodicTrafficResetJob("daily"))
// Run once a week, midnight between Sat/Sun // Run once a week, midnight between Sat/Sun