fix(service): необъявленные вызовы в watchdog и telegram-воркере

- watchdog: command_output_from_args использовался без биндинга —
  «Graceful degradation: check_mixed_proxy_port failed: left-hand
  side is not a function» на каждом проходе
- telegram: write_heartbeat звал write_text_file из core.helpers,
  который не импортировался — «Worker loop error» каждый цикл,
  heartbeat не писалcя, воркер зря перезапускался по стейлу
- E2E: ноль «left-hand side» в логах OpenWrt-контейнера после фикса
This commit is contained in:
Dushnilin
2026-08-24 10:53:06 +03:00
parent 7da51a62d7
commit 6bbc37cfdd
2 changed files with 3 additions and 0 deletions
@@ -3,6 +3,7 @@
let fs = require("fs");
let uci_core = require("core.uci");
let common = require("core.common");
let helpers = require("core.helpers");
let api = require("service.api");
let dns_presets = require("singbox.dns_presets"); // Our new API module
@@ -20,6 +21,7 @@ let command_success_from_args = common.command_success_from_args;
let command_from_args = common.command_from_args;
let command_capture = common.command_capture;
let command_output_from_args = common.command_output_from_args;
let write_text_file = helpers.write_text_file;
// ─── Callback Data Helpers ────────────────────────────────────────────────────
@@ -28,6 +28,7 @@ let telegram_msg_window = time();
let command_from_args = common.command_from_args;
let command_status = common.command_status;
let command_success_from_args = common.command_success_from_args;
let command_output_from_args = common.command_output_from_args;
let is_process_name_running = helpers.is_process_name_running;
function command_capture(command) {