The scraper should store a record of runs, including a timestamp (or two – started_at and ended_at) and whether the run was successful. Then on the frontend, we can run this sort of query:
SELECT `started_at`
FROM `scraper_run`
WHERE success = true
ORDER BY `started_at` DESC
LIMIT 1
…In order to display to end users how up-to-date the data is.
The scraper should store a record of runs, including a timestamp (or two –
started_at
andended_at
) and whether the run was successful. Then on the frontend, we can run this sort of query:…In order to display to end users how up-to-date the data is.