pm2 and bitwise operators
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
I want to use "pm2 start index.js --no-autorestart && pm2 restart index.js" via CI/CD
How could we reproduce this issue?
Create a CI/CD script that pushes a nodejs project to a remote server, and then start or restart the app depending on the deploy state.
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Fri Aug 21 2020 18:31:00 GMT+0000 (UTC)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 4.3.1
node version : 8.10.0
node path : not found
argv : /usr/bin/node,/usr/local/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : docroot
uid : 1000
gid : 1000
uptime : 3431min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 4.3.1
node version : 8.10.0
node path : /usr/local/bin/pm2
argv : /usr/bin/node,/usr/local/bin/pm2,report
argv0 : node
user : docroot
uid : 1000
gid : 1000
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
cpus nb : 1
freemem : 67166208
totalmem : 2090008576
home : /home/docroot
===============================================================================
--- PM2 list -----------------------------------------------
[[ redacted ]]
===============================================================================
--- Daemon logs --------------------------------------------
/home/docroot/.pm2/pm2.log last 20 lines:
PM2 | 2020-08-21T17:49:25: PM2 log: Stopping app:redacted id:39
PM2 | 2020-08-21T17:49:25: PM2 log: App [redacted:39] exited with code [0] via signal [SIGINT]
PM2 | 2020-08-21T17:49:25: PM2 log: pid=16244 msg=process killed
PM2 | 2020-08-21T17:49:25: PM2 log: App [redacted:39] starting in -fork mode-
PM2 | 2020-08-21T17:49:25: PM2 log: App [redacted:39] online
PM2 | 2020-08-21T17:53:16: PM2 log: Stopping app:redacted id:39
PM2 | 2020-08-21T17:53:16: PM2 log: App [redacted:39] exited with code [0] via signal [SIGINT]
PM2 | 2020-08-21T17:53:16: PM2 log: pid=16694 msg=process killed
PM2 | 2020-08-21T17:53:16: PM2 log: App [redacted:39] starting in -fork mode-
PM2 | 2020-08-21T17:53:16: PM2 log: App [redacted:39] online
PM2 | 2020-08-21T18:05:12: PM2 log: Stopping app:redacted2 id:21
PM2 | 2020-08-21T18:05:12: PM2 log: App [redacted2:21] exited with code [0] via signal [SIGINT]
PM2 | 2020-08-21T18:05:12: PM2 log: pid=14151 msg=process killed
PM2 | 2020-08-21T18:05:12: PM2 log: App [redacted2:21] starting in -fork mode-
PM2 | 2020-08-21T18:05:12: PM2 log: App [redacted2:21] online
PM2 | 2020-08-21T18:23:22: PM2 log: Stopping app:redacted2 id:21
PM2 | 2020-08-21T18:23:22: PM2 log: App [redacted2:21] exited with code [0] via signal [SIGINT]
PM2 | 2020-08-21T18:23:22: PM2 log: pid=17208 msg=process killed
PM2 | 2020-08-21T18:23:22: PM2 log: App [redacted2:21] starting in -fork mode-
PM2 | 2020-08-21T18:23:22: PM2 log: App [redacted2:21] online
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified. Start by reproducing the command pm2 start index.js --no-autorestart && pm2 restart index.js in a CI/CD deployment script, then inspect the PM2 CLI handling for --no-autorestart and command chaining. Done means the intended start-or-restart behavior is clearly reproduced and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100