Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save process state for startup hook #3756

Closed
hufftheweevil opened this issue Jul 3, 2018 · 3 comments
Closed

How to save process state for startup hook #3756

hufftheweevil opened this issue Jul 3, 2018 · 3 comments

Comments

@hufftheweevil
Copy link

Is it possible to save the state of each process in the startup hook (pm2 save)?

I am using pm2 version 2.10.4 on Windows 10, and I am using the pm2-windows-startup module. It works great, but I have some processes that I want to be listed at startup but not running. Is this possible?

@wallet77
Copy link
Contributor

wallet77 commented Jul 5, 2018

Hi @hufftheweevil

No it's not currently possible.
I think it's close to #3759

If you confirm I can close this one a keep only the issue above.

@hufftheweevil
Copy link
Author

Yes, I suppose that is a similar feature request. I would assume it means that pm2 save would need to store the status of each process in the dump file and then pm2 resurrect would need to read those statuses and act accordingly.

@wallet77
Copy link
Contributor

wallet77 commented Jul 5, 2018

Yes, but with an important precision, we must distinguish if :

  • a process is stopped due to an error => then pm2 should try to resurrect it
  • a process is stopped manually => then pm2 should keep this process as stopped

@wallet77 wallet77 closed this as completed Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants