The detect loop is composed of three 'one shot tasks' download_dependencies
, update_geonames
, update_languages
ensuring the system has
all necessary components and data to run the three recurrent tasks generate_alerts
The loop report progress on the 'tasks.json' file which is read or created by this function.
The recurrent tasks are scheduled to be executed each 'detect span' minutes, which is a parameter set on the Shiny app.
If any of these tasks fails it will be retried three times before going to abort status. Aborted tasks can be relaunched from the Shiny app.