KitaPlatzZentrale / kpz

1 stars 0 forks source link

Updated data fetching process #106

Closed Darjusch closed 4 months ago

Darjusch commented 4 months ago

The Scraper now fetches data and adds it with a dynamic version number to the database.

To test:

Start the backend and make a request. GET http://localhost:3000/scrape

In the database: https://cloud.mongodb.com/v2/64417c194d775c4fb22e5833#/metrics/replicaSet/64417c3c94d95515db77c51b/explorer/realData/kitadetails/find

You can filter: {version: "3"}, {version: "4"} etc.. and see if the new version is there.


I also created a CronJob that will call this endpoint once a day using a API-Key for authentication. The Cronjob will be in action once it is on Dev. If it works on Dev i will activate it for Main.

Link to Lambda / CronJob ( https://eu-central-1.console.aws.amazon.com/lambda/home?region=eu-central-1#/functions/runScraper?code&tab=code )