[PR #5269] [MERGED] refactor(web): centralize background job cadences #5836

Closed
opened 2026-11-02 04:04:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5269
Author: @n0ctal
Created: 6/13/2026
Status: ✅ Merged
Merged: 6/14/2026
Merged by: @MHSanaei

Base: main ← Head: pr-0009-job-cadences-main


📝 Commits (1)

  • 512e196 refactor(web): centralize background job cadences

📊 Changes

2 files changed (+63 additions, -10 deletions)

View changed files

➕ internal/web/cadence_test.go (+34 -0)
📝 internal/web/web.go (+29 -10)

📄 Description

Summary

This PR centralizes the hardcoded cron/job cadence strings into named constants.

Why

Background job cadences are currently spread across the web server startup code. Centralizing them makes tuning and review easier and reduces the chance of accidental drift.

This PR is intentionally a no-behavior-change refactor.

Scope

  • moves cron cadence strings into named constants
  • keeps the same schedules
  • does not change job logic

Validation

  • added/updated tests to validate the cron expressions
  • verified as no behavioral change

Risk

Low. This is a maintainability refactor only.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5269 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 6/13/2026 **Status:** ✅ Merged **Merged:** 6/14/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `pr-0009-job-cadences-main` --- ### 📝 Commits (1) - [`512e196`](https://github.com/MHSanaei/3x-ui/commit/512e196a2cb7fd975dd7d30884d587391488aaec) refactor(web): centralize background job cadences ### 📊 Changes **2 files changed** (+63 additions, -10 deletions) <details> <summary>View changed files</summary> ➕ `internal/web/cadence_test.go` (+34 -0) 📝 `internal/web/web.go` (+29 -10) </details> ### 📄 Description ## Summary This PR centralizes the hardcoded cron/job cadence strings into named constants. ## Why Background job cadences are currently spread across the web server startup code. Centralizing them makes tuning and review easier and reduces the chance of accidental drift. This PR is intentionally a no-behavior-change refactor. ## Scope - moves cron cadence strings into named constants - keeps the same schedules - does not change job logic ## Validation - added/updated tests to validate the cron expressions - verified as no behavioral change ## Risk Low. This is a maintainability refactor only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5836
No description provided.