This commit is contained in:
Sefinek committed 2025-04-27 02:28:20 +02:00
1 parent 09fdf59394
commit 7bee2b4335
1 file changed
+5 -7
+5 -7
View File
@@ -187,13 +187,11 @@ const processLogLine = async (line, test = false) => {
log('The file has been truncated, and the offset has been reset');
}
fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' })
.on('data', chunk => {
chunk.split('\n').filter(line => line.trim()).forEach(processLogLine);
})
.on('end', () => {
fileOffset = stats.size;
});
fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }).on('data', chunk => {
chunk.split('\n').filter(line => line.trim()).forEach(processLogLine);
}).on('end', () => {
fileOffset = stats.size;
});
});
if (AUTO_UPDATE_ENABLED && AUTO_UPDATE_SCHEDULE && SERVER_ID !== 'development') await require('./scripts/services/updates.js')();