nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
557 stars 270 forks source link

Pin binary version in PM2 config file #3654

Closed kokrui closed 5 months ago

kokrui commented 5 months ago

Context

We've had a few scraper outages caused by the scraper being restarted and PM2 using old versions of node incompatible with some of our code.

This pins the PM2 binary to an updated version, which ensures a sufficiently-updated node version is used, which ensures that the scraper can run correctly independent of other env and path changes we might make in our production environment.

Implementation

We previously used a larger set of env flags to deal with outages, but I've tested that specifying the PM2 binary as I've done so here is sufficient. Let's also print out the node version when starting up our scraper

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview Feb 4, 2024 5:17pm
nusmods-website ✅ Ready (Inspect) Visit Preview Feb 4, 2024 5:17pm
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a35bd8e) 53.18% compared to head (37378af) 53.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3654 +/- ## ======================================= Coverage 53.18% 53.18% ======================================= Files 272 272 Lines 5885 5885 Branches 1397 1397 ======================================= Hits 3130 3130 Misses 2755 2755 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.