Skip to content

Commit

Permalink
disable git parsing by default #5909 #2182 #5801 #5051 #5696
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Nov 13, 2024
1 parent de0dec5 commit fbef812
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 49 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## 5.5.0

- bun support #5893 #5774 #5682 #5675 #5777


## 5.4.1

- @pm2/io DeprecationWarning: The util._extend API is deprecated https://github.com/keymetrics/pm2-io-apm/issues/301 @egoroof
Expand Down
1 change: 1 addition & 0 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var csts = {
CLUSTER_MODE_ID : 'cluster_mode',
FORK_MODE_ID : 'fork_mode',

ENABLE_GIT_PARSING : false,
LOW_MEMORY_ENVIRONMENT : process.env.PM2_OPTIMIZE_MEMORY || false,

MACHINE_NAME : process.env.INSTANCE_NAME || process.env.MACHINE_NAME || process.env.PM2_MACHINE_NAME,
Expand Down
4 changes: 3 additions & 1 deletion lib/God.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ God.executeApp = function executeApp(env, cb) {
cb_called = true

// If vizion enabled run versioning retrieval system
if (proc.pm2_env.vizion !== false && proc.pm2_env.vizion !== "false")
if (cst.ENABLE_GIT_PARSING === true &&
proc.pm2_env.vizion !== false && proc.pm2_env.vizion !== "false") {
God.finalizeProcedure(proc);
}
else
God.notify('online', proc);

Expand Down
46 changes: 0 additions & 46 deletions lib/Worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Use of this source code is governed by a license that
* can be found in the LICENSE file.
*/
const vizion = require('vizion');
const eachLimit = require('async/eachLimit');
const debug = require('debug')('pm2:worker');
const domain = require('domain');
Expand Down Expand Up @@ -95,51 +94,6 @@ module.exports = function(God) {
}
};

// Deprecated
var versioningRefresh = function(proc_key, cb) {
var proc = _getProcessById(proc_key.pm2_env.pm_id);
if (!(proc &&
proc.pm2_env &&
(proc.pm2_env.vizion !== false && proc.pm2_env.vizion != "false") &&
proc.pm2_env.versioning &&
proc.pm2_env.versioning.repo_path)) {
return cb();
}

if (proc.pm2_env.vizion_running === true)
{
debug('Vizion is already running for proc id: %d, skipping this round', proc.pm2_env.pm_id);
return cb();
}

proc.pm2_env.vizion_running = true;
var repo_path = proc.pm2_env.versioning.repo_path;

vizion.analyze({
folder: proc.pm2_env.versioning.repo_path
},
function(err, meta) {
if (err != null)
return cb();

proc = _getProcessById(proc_key.pm2_env.pm_id);

if (!(proc &&
proc.pm2_env &&
proc.pm2_env.versioning &&
proc.pm2_env.versioning.repo_path)) {
console.error('Proc not defined anymore or versioning unknown');
return cb();
}

proc.pm2_env.vizion_running = false;
meta.repo_path = repo_path;
proc.pm2_env.versioning = meta;
debug('[PM2][WORKER] %s parsed for versioning', proc.pm2_env.name);
return cb();
});
};

var tasks = function() {
if (God.Worker.is_running === true) {
debug('[PM2][WORKER] Worker is already running, skipping this round');
Expand Down
2 changes: 1 addition & 1 deletion test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ "$IS_BUN" = false ]; then
runTest ./test/e2e/internals/wrapped-fork.sh
runTest ./test/e2e/logs/log-json.sh
runTest ./test/e2e/misc/inside-pm2.sh
runTest ./test/e2e/misc/versioning-cmd.sh
#runTest ./test/e2e/misc/versioning-cmd.sh
fi

runTest ./test/e2e/internals/infinite-loop.sh
Expand Down
2 changes: 1 addition & 1 deletion test/unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runUnitTest $D/auto_restart.mocha.js
runUnitTest $D/containerizer.mocha.js
runUnitTest $D/api.mocha.js
runUnitTest $D/lazy_api.mocha.js
runUnitTest $D/version.mocha.js
#runUnitTest $D/version.mocha.js
runUnitTest $D/exp_backoff_restart_delay.mocha.js
runUnitTest $D/api.backward.compatibility.mocha.js
runUnitTest $D/custom_action.mocha.js
Expand Down

0 comments on commit fbef812

Please sign in to comment.