OSU-Sustainability-Office / automated-jobs

This repository contains various batch-like containerized tasks for OSU SO's data collection operations.
1 stars 0 forks source link

Add command line arguments for enabling / disabling webscraper uploading #41

Closed solderq35 closed 6 months ago

solderq35 commented 7 months ago

Example from check-acq:

So for the current webscrapers (SEC, EnnexOS, PacificPower), instead of having to use block comments (that you need to edit every time) to control upload, we can switch to something like this (wrap it around the code block where the uploading is happening)

if (!process.argv.includes("--no-upload")) {
  // insert upload code here;
}

I was thinking to set a flag only to disable uploading, since the default behavior on production is to allow uploading (if more arguments are needed on production, we will need to update the dockerfile).

And then you call the script with node <scriptname>.js --no-upload