diff --git a/package.json b/package.json index f7efba67db0a09bb613504f00aa9c0fac1dfe5a5..c2627a803cb3b6e7f93687ea4697fdde275f6481 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,6 @@ "remark-gfm": "^3.0.1", "serve-favicon": "^2.5.0", "swr": "^2.2.0", - "tail": "^2.2.6", "tree-kill": "^1.2.2", "use-debounce": "^9.0.4", "validator": "^13.7.0" @@ -292,4 +291,4 @@ ], "logLevel": "quiet" } -} \ No newline at end of file +} diff --git a/src/main/main.ts b/src/main/main.ts index 3a451debda9e65046b025320d7f81edd7e4959e0..18413cfa45a489e71409efa8bcafe0c774df2d0b 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -35,7 +35,7 @@ import { checkDependencies, checkIfCondaBinExists, getLogFilePath, - isPlatformWindows + isPlatformWindows, } from './util'; import installExtension, { @@ -139,7 +139,7 @@ const startListeningToServerLog = async () => { // Now listen to the log file and send updates to the renderer const logFile = await getLogFilePath(); - console.log(`🤡 Asking Chokidar to start`); + // console.log(`🤡 Asking Chokidar to start`); let options = {}; @@ -151,8 +151,6 @@ const startListeningToServerLog = async () => { const watcher = new FileWatcher(logFile, options); - let currentlySubscribed = false; - ipcMain.on('serverLog:startListening', async (event) => { console.log('main.js: start listening to log'); event.reply( @@ -160,32 +158,10 @@ const startListeningToServerLog = async () => { '**Connecting to Terminal Output from Transformer Engine**' ); watcher.start(); - currentlySubscribed = true; watcher.on('update', (data) => { event.reply('serverLog:update', data); }); - - // if (!tail.isWatching) { - // tail.watch(); - // } - // console.log('logFile', logFile); - // if (currentlySubscribed) { - // console.log('already watching'); - // return; - // } - - // currentlySubscribed = true; - // tail = new Tail(logFile); - - // tail.on('line', function (data) { - // // console.log('main.js: line', data); - // event.reply('serverLog:update', data); - // }); - - // tail.on('error', function (error) { - // console.log('ERROR: ', error); - // }); }); ipcMain.on('serverLog:stopListening', async (event) => { @@ -195,7 +171,6 @@ const startListeningToServerLog = async () => { '**Disconnecting Terminal Output from Transformer Engine**' ); watcher.stop(); - currentlySubscribed = false; }); };