Possibility to change the refresh update
jonathan-gatard opened this issue · 2 comments
jonathan-gatard commented
Hi,
We can also add a variable to change the refresh update.
60s is too much for me. 1 hour is good for me.
I changed the value directly, but maybe we could use a ENV_VAR to do this ?
jonathan-gatard commented
I added this in ENV_VAR, but maybe there is a better solution:
https://github.com/Kalypox/suivi-bourse-app/commit/2264682993cbf9741a713802ef2a457665250bab
https://github.com/Kalypox/suivi-bourse-app/commit/6c152493b8069c297b8ae8b77df34ea0a6d4d5a6
pbrissaud commented
Hi,
With release 2.0, the scraping time can be set :
- via ENV :
export APP_SCRAPING_INTERVAL=120
python3 app/main.py
- via CLI opt :
python3 app/main.py --interval 120
- or in docker-compose :
version: "3.8"
services:
app:
...
environment:
...
- APP_SCRAPING_INTERVAL=120 #add this line
The time is in seconds.
Tell me if it's fine for you