detect_loop {epitweetr} | R Documentation |
Runs the detect loop
Description
Infinite loop ensuring the daily signal detection and email alerts
Usage
detect_loop(data_dir = NA)
Arguments
data_dir |
Path to the 'data directory' containing application settings, models and collected tweets.
If not provided the system will try to reuse the existing one from last session call of |
Details
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.
Value
nothing
See Also
Examples
if(FALSE){
#Running the detect loop
library(epitweetr)
message('Please choose the epitweetr data directory')
setup_config(file.choose())
detect_loop()
}