feat(NetworkMapScheduler): enhance job execution logging and add force refresh option for ping and speed tests
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m44s

This commit is contained in:
2026-02-18 13:23:03 +07:00
parent b1834e988b
commit 89d71ff060
3 changed files with 33 additions and 8 deletions
+3 -1
View File
@@ -514,6 +514,7 @@ async function pingViaInterface(req, res) {
interfaceName,
target,
count = 5,
forceRefresh = false,
} = req.body || {};
if (!serverId) {
@@ -528,7 +529,8 @@ async function pingViaInterface(req, res) {
}
const pingCacheMinutes = Math.max(0, parseInt(uiSettings.pingCacheMinutes, 10) || 0);
const cacheKey = pingCacheMinutes > 0 ? pingCacheKey(serverId, gatewayIp, target) : null;
if (cacheKey) {
const skipCacheRead = forceRefresh === true;
if (!skipCacheRead && cacheKey) {
try {
const data = await readS3TextObject(cacheKey).catch(() => null);
if (data?.body) {
+9
View File
@@ -84,13 +84,22 @@ async function runNetworkMapSchedulerNow(req, res) {
baseUrl,
runPing: settings.runPing,
runSpeedTest: settings.runSpeedTest,
trigger: 'manual',
}).catch((err) => {
console.error('[scheduler] run-now failed', err);
const msg = err?.message || String(err);
try {
networkMapScheduler.pushLog(`Ошибка выполнения: ${msg}`);
} catch (_) {}
});
return sendOk(res, { message: 'Запуск выполняется в фоне' });
} catch (e) {
console.error('[scheduler] run-now', e);
const msg = e?.message || String(e);
try {
networkMapScheduler.pushLog(`Ошибка запуска: ${msg}`);
} catch (_) {}
return sendError(res, 500, 'Не удалось запустить', 'E_SCHEDULER');
}
}