mttchpmn / metscope

Express API for MetScope Platform
0 stars 0 forks source link

Handle stale / offline webcams #18

Open mttchpmn opened 5 years ago

mttchpmn commented 5 years ago
mttchpmn commented 5 years ago

Perhaps in loadAll.js add a check to get all webcams from last 24 hours, but ALSO to check that there's also cams from at least the last 6 hours (or 3 hrs), and if not, then don't return any images in array.

Front end can handle by checking to see if images array.length prop > 0

Equally, we could also add a stale: true flag to the response object (this may be most robust)

mttchpmn commented 5 years ago

We shouldn't drop cams from the response just because they are stale, as front end may want to display them regardless, and just show an icon to denote they are stale temporairly