diff --git a/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.down.sql b/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.down.sql new file mode 100644 index 0000000..5299f11 --- /dev/null +++ b/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.down.sql @@ -0,0 +1,5 @@ +UPDATE ops.scheduler_jobs +SET interval_seconds = 60, + config = COALESCE(config, '{}'::jsonb) - 'suppress_empty_success_runs' - 'empty_success_metric_keys', + updated_at = NOW() +WHERE job_key = 'monitoring_lease_recovery'; diff --git a/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.up.sql b/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.up.sql new file mode 100644 index 0000000..ea9fcd1 --- /dev/null +++ b/server/migrations_ops/20260623111500_set_monitoring_lease_recovery_interval_10m.up.sql @@ -0,0 +1,6 @@ +UPDATE ops.scheduler_jobs +SET interval_seconds = 600, + description = '按过期租约索引限批回收超过租约时间仍未回调的监控任务,并释放卡住的桌面监控任务。', + config = COALESCE(config, '{}'::jsonb) || '{"suppress_empty_success_runs":true,"empty_success_metric_keys":["expired_task_count","failed_desktop_monitor_count"]}'::jsonb, + updated_at = NOW() +WHERE job_key = 'monitoring_lease_recovery';