mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-10-26 06:30:07 -05:00
SDA-4415: Fix comments
This commit is contained in:
1 parent
e939420435
commit
2fe830a3ed
3 files changed
+10
-6
No files matched your search
@@ -61,7 +61,7 @@ export class FileHelper extends FileHelperBase {
|
||||
const sanitizedFolderPath = path.normalize(folderPath);
|
||||
|
||||
if (!sanitizedLogname || !this.validateFilePath(sanitizedFolderPath)) {
|
||||
logger.log(
|
||||
logger.error(
|
||||
'error',
|
||||
'file-helper: Log file has a malicious format to be exported',
|
||||
);
|
||||
@@ -87,7 +87,7 @@ export class FileHelper extends FileHelperBase {
|
||||
modifiedTimestamp: currentLogModifiedTimestamp,
|
||||
};
|
||||
|
||||
if (timestampDiffInMinutes <= LogUtilities.LOG_TIMESTAMP_THRESH_HOLD) {
|
||||
if (timestampDiffInMinutes <= LogUtilities.LOG_TIMESTAMP_THRESHOLD) {
|
||||
this.files.get().set(`${LogCategory.LATEST}_${index}`, modifiedFile);
|
||||
latestModifiedLogTimestamp = logFileStats.mtime.getTime();
|
||||
} else if (currentLogModifiedTimestamp > latestModifiedLogTimestamp) {
|
||||
|
||||
@@ -11,7 +11,8 @@ export enum LogCategory {
|
||||
|
||||
export enum LogUtilities {
|
||||
ONE_MINUTE = 60000,
|
||||
LOG_TIMESTAMP_THRESH_HOLD = 31,
|
||||
// Timestamp threshold, in minutes
|
||||
LOG_TIMESTAMP_THRESHOLD = 30,
|
||||
}
|
||||
|
||||
export type RetrieveIVLogs = (logsPath: string) => void;
|
||||
|
||||
@@ -126,8 +126,11 @@ export const packageLogs = async (retrievedLogs: ILogs[]): Promise<void> => {
|
||||
const timestamp = new Date().getTime();
|
||||
const destination = app.getPath('downloads') + destPath + timestamp + '.zip';
|
||||
|
||||
removeLastIVLogs(logsPath);
|
||||
extractIVLogs(logsPath);
|
||||
if (isWindowsOS) {
|
||||
removeLastIVLogs(logsPath);
|
||||
extractIVLogs(logsPath);
|
||||
}
|
||||
|
||||
await writeLogs(retrievedLogs);
|
||||
generateArchiveForDirectory(
|
||||
logsPath,
|
||||
@@ -315,7 +318,7 @@ const extractIVLogs: RetrieveIVLogs = (logsPath: string) => {
|
||||
const ivLogsList = fileHelper.getLatestModifiedFiles(ivFolderPath);
|
||||
|
||||
if (ivLogsList.size < 1) {
|
||||
logger.error(`reports-handler: Cannot copy log, logs arent exist`);
|
||||
logger.info(`reports-handler: Cannot copy log, logs arent exist`);
|
||||
} else {
|
||||
try {
|
||||
ivLogsList.forEach((log) => {
|
||||
|
||||
Reference in new issue
Block a user