mirror of
https://github.com/Unitech/pm2.git
synced 2026-02-01 16:57:09 +00:00
chore: merge master in development
This commit is contained in:
commit
0e4453d9cc
@ -4,8 +4,8 @@
|
||||
"intro": "",
|
||||
"branch" : "master",
|
||||
"repo_url": "https://github.com/Unitech/pm2",
|
||||
"version_name" : "v2.10.2",
|
||||
"tag": "2.10.1",
|
||||
"version_name" : "2.10.4",
|
||||
"tag": "2.10.3",
|
||||
"file": "currentTagChangelog.md",
|
||||
"template": "changelogTemplate.md",
|
||||
"sections": [
|
||||
|
||||
5
.github/ISSUE_TEMPLATE.md
vendored
5
.github/ISSUE_TEMPLATE.md
vendored
@ -1,5 +1,7 @@
|
||||
<!--
|
||||
Your issue may already be reported!
|
||||
Please search on the [issue tracker](https://github.com/Unitech/pm2/search?type=Issues) before creating one.
|
||||
-->
|
||||
|
||||
## What's going wrong?
|
||||
|
||||
@ -7,8 +9,9 @@ Please search on the [issue tracker](https://github.com/Unitech/pm2/search?type=
|
||||
|
||||
## Supporting information
|
||||
|
||||
<!--
|
||||
Please run the following command (available on PM2 >= 2.6)
|
||||
|
||||
-->
|
||||
```
|
||||
$ pm2 report
|
||||
```
|
||||
|
||||
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,5 +1,6 @@
|
||||
<!--
|
||||
Please always submit pull requests on the development branch.
|
||||
|
||||
-->
|
||||
| Q | A
|
||||
| ------------- | ---
|
||||
| Bug fix? | yes/no
|
||||
@ -10,5 +11,6 @@ Please always submit pull requests on the development branch.
|
||||
| Fixed tickets | #1234, #5678
|
||||
| License | MIT
|
||||
| Doc PR | https://github.com/pm2-hive/pm2-hive.github.io/pulls
|
||||
|
||||
<!--
|
||||
*Please update this template with something that matches your PR*
|
||||
-->
|
||||
31
CHANGELOG.md
31
CHANGELOG.md
@ -1,3 +1,32 @@
|
||||
## 2.10.4 ( Thu May 17 2018 14:32:40 GMT+0200 (CEST) )
|
||||
|
||||
|
||||
## Bug Fixes
|
||||
- #3645 throttle startup
|
||||
([d529f675](https://github.com/Unitech/pm2/commit/d529f675d0240777cba95442ba35205c370cdb43))
|
||||
|
||||
|
||||
|
||||
|
||||
## Chore
|
||||
- update issue and PR templates to use comments to hide instructions in the frontend
|
||||
([9e0180ed](https://github.com/Unitech/pm2/commit/9e0180eddab071916144ad7008817bd6aef1c8ce))
|
||||
|
||||
|
||||
|
||||
|
||||
## Pull requests merged
|
||||
- Merge pull request #3664 from DanielRuf/chore/update-issue-pr-templates
|
||||
([067446f2](https://github.com/Unitech/pm2/commit/067446f2133ba7f761b0ad3c9f3692b167affd8b))
|
||||
|
||||
|
||||
## v2.10.3 ( Fri Apr 27 2018 11:42:16 GMT+0200 (CEST) )
|
||||
|
||||
|
||||
### Chore
|
||||
- upgrade for node 10
|
||||
([cf7630e](https://github.com/Unitech/pm2/commit/cf7630e259742bdff8257cff4dbed2732bf24f9c))
|
||||
|
||||
## v2.10.2 ( Thu Mar 29 2018 13:06:11 GMT+0200 (CEST) )
|
||||
|
||||
|
||||
@ -15,7 +44,7 @@
|
||||
([438e3030](https://github.com/Unitech/pm2/commit/438e303013e82ecc199cb68d018144cde8a0b2e6))
|
||||
- Merge pull request #3532 from N-Nagorny/logs-smart-app-name-cutting
|
||||
([067c18e6](https://github.com/Unitech/pm2/commit/067c18e601aca4fac10101a7c23cc4c3525ad776))
|
||||
|
||||
|
||||
|
||||
|
||||
## v2.10.1 ( Mon Feb 26 2018 11:38:18 GMT+0100 (CET) )
|
||||
|
||||
@ -68,7 +68,7 @@ Your app is now daemonized, monitored and kept alive forever.
|
||||
### Container Support
|
||||
|
||||
With the drop-in replacement command for `node`, called `pm2-runtime`, run your Node.js application in a proper production environment.
|
||||
We also offer an [officialy supported Docker image](https://hub.docker.com/r/keymetrics/pm2/).
|
||||
There is also an [officialy supported Docker image](https://hub.docker.com/r/keymetrics/pm2/).
|
||||
|
||||
Using it is seamless:
|
||||
|
||||
|
||||
@ -221,12 +221,21 @@ module.exports = function(CLI) {
|
||||
else
|
||||
template = getTemplate('systemd');
|
||||
destination = '/etc/systemd/system/' + service_name + '.service';
|
||||
|
||||
commands = [
|
||||
'systemctl enable ' + service_name,
|
||||
'systemctl start ' + service_name,
|
||||
'systemctl daemon-reload',
|
||||
'systemctl status ' + service_name
|
||||
];
|
||||
'systemctl enable ' + service_name
|
||||
]
|
||||
|
||||
try {
|
||||
fs.readFileSync(cst.PM2_PID_FILE_PATH).toString()
|
||||
} catch(e) {
|
||||
commands = [
|
||||
'systemctl enable ' + service_name,
|
||||
'systemctl start ' + service_name,
|
||||
'systemctl daemon-reload',
|
||||
'systemctl status ' + service_name
|
||||
]
|
||||
}
|
||||
break;
|
||||
case 'ubuntu14':
|
||||
case 'ubuntu12':
|
||||
@ -315,10 +324,10 @@ module.exports = function(CLI) {
|
||||
Common.printOut(cst.PREFIX_MSG + 'Making script booting at startup...');
|
||||
|
||||
async.forEachLimit(commands, 1, function(command, next) {
|
||||
Common.printOut(chalk.bold('>>> Executing %s'), command);
|
||||
Common.printOut(cst.PREFIX_MSG + '[-] Executing: %s...', chalk.bold(command));
|
||||
require('shelljs').exec(command, function(code, stdout, stderr) {
|
||||
if (code === 0) {
|
||||
Common.printOut(chalk.bold('[DONE] '));
|
||||
Common.printOut(cst.PREFIX_MSG + chalk.bold('[v] Command successfully executed.'));
|
||||
return next();
|
||||
} else {
|
||||
Common.printOut(chalk.red('[ERROR] Exit code : ' + code))
|
||||
|
||||
@ -271,6 +271,10 @@ Daemon.prototype.close = function(opts, cb) {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
fs.unlinkSync(that.pid_path);
|
||||
} catch(e) {}
|
||||
|
||||
console.log('PM2 successfully stopped');
|
||||
setTimeout(function() {
|
||||
process.exit(cst.SUCCESS_EXIT);
|
||||
@ -282,10 +286,10 @@ Daemon.prototype.close = function(opts, cb) {
|
||||
Daemon.prototype.handleSignals = function() {
|
||||
var that = this;
|
||||
|
||||
process.on('SIGTERM', that.gracefullExit);
|
||||
process.on('SIGINT', that.gracefullExit);
|
||||
process.on('SIGTERM', that.gracefullExit.bind(this));
|
||||
process.on('SIGINT', that.gracefullExit.bind(this));
|
||||
process.on('SIGHUP', function() {});
|
||||
process.on('SIGQUIT', that.gracefullExit);
|
||||
process.on('SIGQUIT', that.gracefullExit.bind(this));
|
||||
process.on('SIGUSR2', function() {
|
||||
God.reloadLogs({}, function() {});
|
||||
});
|
||||
@ -313,6 +317,11 @@ Daemon.prototype.sendReady = function(cb) {
|
||||
Daemon.prototype.gracefullExit = function() {
|
||||
var that = this;
|
||||
|
||||
God.bus.emit('pm2:kill', {
|
||||
status : 'killed',
|
||||
msg : 'pm2 has been killed by SIGNAL'
|
||||
});
|
||||
|
||||
console.log('pm2 has been killed by signal, dumping process list before exit...');
|
||||
|
||||
God.dumpProcessList(function() {
|
||||
@ -324,13 +333,14 @@ Daemon.prototype.gracefullExit = function() {
|
||||
God.deleteProcessId(proc.pm2_env.pm_id, function() {
|
||||
return next();
|
||||
});
|
||||
return false;
|
||||
}, function(err) {
|
||||
try {
|
||||
fs.unlinkSync(that.pid_path);
|
||||
} catch(e) {}
|
||||
console.log('Exited peacefully');
|
||||
process.exit(0);
|
||||
setTimeout(function() {
|
||||
console.log('Exited peacefully');
|
||||
process.exit(cst.SUCCESS_EXIT);
|
||||
}, 2);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pm2",
|
||||
"preferGlobal": true,
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.0-alpha1",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user