Skip to content

Conversation

@rickybharti
Copy link

Description

This update enhances PM2 process management script by:

  • Adding input validation for count.
  • Implementing retries for failed process starts.
  • Handling graceful shutdown with SIGINT.

Key Changes

  • Validates count as a positive integer.
  • Starts processes with retry logic on failure.
  • Tracks started and failed processes, exiting appropriately.
  • Ensures PM2 disconnects gracefully on SIGINT.

Testing

  • Validated various count inputs.
  • Tested process start failures and retries.
  • Simulated graceful shutdown with SIGINT.

Note: SIGINT hasn't been tested extensively. Please try to test it thoroughly before approving. (@soniasingla)
Please review and provide feedback.

@soniasingla
Copy link
Contributor

@rickybharti thanks for your PR, amazing work 🤗 I am working on reviewing it and will get back to you :)

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

Successfully merging this pull request may close these issues.

2 participants