feat(worker): add autosync scheduler, endpoint, locking and UI controls

This commit is contained in:
2026-03-05 17:33:14 +00:00
parent 34aa17a74a
commit 5e5fb3221a
10 changed files with 567 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ export default async function DashboardPage() {
supabase
.from("plesk_instances")
.select(
"id, name, base_url, auth_type, status, error_message, last_connected_at, last_sync_at, last_sync_status, last_sync_error, last_sync_subscriptions, last_sync_domains",
"id, name, base_url, auth_type, status, error_message, last_connected_at, last_sync_at, last_sync_status, last_sync_error, last_sync_subscriptions, last_sync_domains, auto_sync_enabled, auto_sync_frequency_minutes, last_auto_sync_at, next_auto_sync_at, auto_sync_lock_until",
)
.eq("agency_id", context.agencyId)
.order("created_at", { ascending: false }),
@@ -104,6 +104,11 @@ export default async function DashboardPage() {
last_sync_error: string | null;
last_sync_subscriptions: number;
last_sync_domains: number;
auto_sync_enabled: boolean;
auto_sync_frequency_minutes: number;
last_auto_sync_at: string | null;
next_auto_sync_at: string | null;
auto_sync_lock_until: string | null;
}> | null;
error: { message: string } | null;
},