You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is possible just to add new actions to be executed in the cleanup. However, in some cases, we want to add action and remove it after that.
Also, we need to delete some lock files when CLI is not using them anymore. So, introduce new API in the cleanup service that allow all of these actions.
fileLogService.logData({message: `cleanup-process removed action for execution: ${JSON.stringify(actionToRemove)}`});
42
59
}else{
43
-
fileLogService.logData({message: `cleanup-process will not add action for execution as it has been added already: ${JSON.stringify(newAction)}`});
60
+
fileLogService.logData({message: `cleanup-process cannot remove action for execution as it has note been added before: ${JSON.stringify(actionToRemove)}`});
61
+
}
62
+
};
63
+
64
+
constaddDeleteAction=(filePath: string): void=>{
65
+
constfullPath=path.resolve(filePath);
66
+
67
+
if(_.some(filesToDelete,f=>f===fullPath)){
68
+
fileLogService.logData({message: `cleanup-process will not add ${fullPath} for deletion as it has been added already`});
69
+
}else{
70
+
filesToDelete.push(fullPath);
71
+
fileLogService.logData({message: `cleanup-process added ${fullPath} for deletion`});
fileLogService.logData({message: `cleanup-process removed ${fullPath} from the list of files for deletion.`});
81
+
}else{
82
+
fileLogService.logData({message: `cleanup-process cannot remove ${fullPath} for deletion as no such entry is found in the files marked for deletion`});
fileLogService.logData({message: `Unable to handle message of type ${cleanupProcessMessage.actionType}. Full message is ${JSON.stringify(cleanupProcessMessage)}`,type: FileLogMessageType.Error});
0 commit comments