From 52ef8f192f5c41a82f6ef5f16a8520a364071eeb Mon Sep 17 00:00:00 2001 From: nguyentrungthat <80239428+nguentrungthat@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:23:55 +0700 Subject: [PATCH] Update line_connection.ts --- BACKEND/app/services/line_connection.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts index 2d6af9a..a9136cc 100644 --- a/BACKEND/app/services/line_connection.ts +++ b/BACKEND/app/services/line_connection.ts @@ -10,8 +10,6 @@ import { sleep, } from '../ultils/helper.js' import Scenario from '#models/scenario' -import Station from '#models/station' -import APCController from './apc_connection.js' import path from 'node:path' import axios from 'axios' import redis from '@adonisjs/redis/services/main' @@ -288,26 +286,6 @@ export default class LineConnection { // ) this.client.write(cmd) - if (userName) { - // appendLog( - // `\n---${userName}---\n`, - // this.config.stationId, - // this.config.lineNumber, - // this.config.port - // ) - // for (const char of command) { - // if (char === '\x7F') this.bufferCommand = this.bufferCommand.slice(0, -1) - // else if (char === '\r' && cleanData(this.bufferCommand).length > 0) { - // this.config.commands = [ - // cleanData(this.bufferCommand.replace('\r', '')), - // ...this.config.commands.filter( - // (el) => el !== cleanData(this.bufferCommand.replace('\r', '')) - // ), - // ].slice(0, 10) - // this.bufferCommand = '' - // } else this.bufferCommand += char - // } - } } async disconnect() { @@ -473,7 +451,7 @@ export default class LineConnection { console.log(pid, scenario?.title, this.listScenarios) if (scenario && scenario.id !== script.id) { this.listScenarios.push(scenario.id) - this.outputScenario = '' + // this.outputScenario = '' this.runScript(scenario, userName) // this.socketIO.emit('confirm_scenario', { // scenario: scenario,