-
It would be useful to not need to worry about the process stopping once i stop my terminal. PM2 is also useful on reboots. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
@github-actions run ⚡ Release! ⚡(async () => {
function exec(cmd) {
console.log(execSync(cmd).toString());
}
//set the version type
process.env.VERS = "minor"
// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";
exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i -D`);
exec(`npm run release-ci $VERS`);
// types only package
exec('npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN')
exec(`cd ./types-only && npm version $VERS && npm run build && npm publish && cd ..`);
exec(`git commit -a -m 'updated types-only package'`);
exec(`git push --force`);
//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
})(); |
Beta Was this translation helpful? Give feedback.
-
Changelog🚀 Release 4.35.0 (2022-04-12) |
Beta Was this translation helpful? Give feedback.
-
As of V4.35.0, you can now offload the EASY API/CLI process to pm2. This is convenient to bring back sessions upon restarts, managing memory usage, etc. Examples: 1. Simple offload Just set > npx @open-wa/wa-automate --pm2 --session-id STICKER-BOT
If you want to keep your existing session ID but want to change the name of the pm2 process you can use > npx @open-wa/wa-automate --pm2 --name STICKER-BOT 2. With PM2 flags PM2 itself has some powerful features (e.g restarting a process if it reaches a certain memory threshold. You can tap into those features by adding pm2 cli flags. > npx @open-wa/wa-automate --pm2 "--max-memory-restarts 300M --cron-restart=\"0 */3 * * *\" --restart-delay=3000" --name STICKER-BOT
|
Beta Was this translation helpful? Give feedback.
-
If you want to auto start using pm2 then have a look here. Autostart @open-wa/wa-automate on Raspberry Pi using pm2 |
Beta Was this translation helpful? Give feedback.
-
It produces following error
|
Beta Was this translation helpful? Give feedback.
As of V4.35.0, you can now offload the EASY API/CLI process to pm2. This is convenient to bring back sessions upon restarts, managing memory usage, etc.
Examples:
1. Simple offload
Just set
--pm2
, the name of the process is taken by the--session-id
flag (default:@OPEN-WA EASY API
)> npx @open-wa/wa-automate --pm2 --session-id STICKER-BOT
If you want to keep your existing session ID but want to change the name of the pm2 process you can use
--name
flag instead.> npx @open-wa/wa-automate --pm2 --name STICKER-BOT
2. With PM2 flags
PM2 itself has some powerful features (e.g restarting a process if it reaches a certain memory thres…