MCPcopy
hub / github.com/Unitech/pm2 / pushIfUnique

Function pushIfUnique

lib/API/LogManagement.js:142–159  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

140
141 // Avoid duplicates and check if path is different from '/dev/null'
142 var pushIfUnique = function(entry) {
143 var exists = false;
144
145 if (entry.path.toLowerCase
146 && entry.path.toLowerCase() !== '/dev/null') {
147
148 files_list.some(function(file) {
149 if (file.path === entry.path)
150 exists = true;
151 return exists;
152 });
153
154 if (exists)
155 return;
156
157 files_list.push(entry);
158 }
159 }
160
161 // Get the list of all running apps
162 that.Client.executeRemote('getMonitorData', {}, function(err, list) {

Callers 1

LogManagement.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…