chronicle-app / chronicle-etl

📜 A CLI toolkit for extracting and working with your digital history
https://chronicle.app/
MIT License
149 stars 3 forks source link

Runner should be able to disable running `results_count` on an Extractor #3

Open hyfen opened 4 years ago

hyfen commented 4 years ago

results_count is used to build a nice progress bar but sometimes calculating the number of records is a computationally-expensive task (for example, multi gigabyte .mbox files). When we run a job in the background, we probably don't want the speed penalty that comes from calculating this number.

We should be able to pass Runner a configuration option to skip calling this method. If the job is running in a tty, the progress bar will just show the current count without a progress bar.