Skip to content

Enable PM2 to automatically restart Open Terms Archive applications after a reboot#56

Merged
Ndpnt merged 2 commits intomainfrom
auto-restart
Jun 10, 2025
Merged

Enable PM2 to automatically restart Open Terms Archive applications after a reboot#56
Ndpnt merged 2 commits intomainfrom
auto-restart

Conversation

@Ndpnt
Copy link
Copy Markdown
Contributor

@Ndpnt Ndpnt commented Jun 3, 2025

Tested on the experimentation server.

@Ndpnt Ndpnt requested a review from clementbiron June 3, 2025 09:26
Copy link
Copy Markdown
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that respect the fact that the engine would run only if started with --schedule? We don't want to have it get started all the time!


- name: Generate and enable PM2 startup script
ansible.builtin.command:
cmd: sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u {{ ansible_user }} --hp /home/{{ ansible_user }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per our contribution guidelines, we want to use long version options for readability :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was only for documentation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your opinion, what maximises code maintainability?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying it's a bad idea. I just thought that in the contribution guidelines when we were mentioning this was for documentation, so referencing them here didn’t seem entirely relevant. But yes, I’ll use the long version options :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long version option is not available for --hp, so I updated only the first one.

@Ndpnt Ndpnt requested a review from MattiSG June 10, 2025 07:44
@Ndpnt Ndpnt merged commit 56655ad into main Jun 10, 2025
1 check passed
@Ndpnt Ndpnt deleted the auto-restart branch June 10, 2025 13:42
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.

3 participants