fix(wds): remove time window restriction for manual force sync

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-30 07:30:49 +03:00
parent 730eee6c8a
commit 145aa11c55
@@ -177,11 +177,7 @@ export function isWeekendWindow(): boolean {
/** Check if still within the window (called during processing) */ /** Check if still within the window (called during processing) */
function stillInWindow(force?: boolean): boolean { function stillInWindow(force?: boolean): boolean {
if (force) { if (force) return true; // Manual trigger — no time restriction
// Force mode: any night 22:0005:00
const hour = new Date().getHours();
return hour >= 22 || hour < 5;
}
const hour = new Date().getHours(); const hour = new Date().getHours();
// We can be in 23,0,1,2,3 — stop at 4 // We can be in 23,0,1,2,3 — stop at 4
if (hour >= WEEKEND_END_HOUR && hour < WEEKEND_START_HOUR) return false; if (hour >= WEEKEND_END_HOUR && hour < WEEKEND_START_HOUR) return false;