detect_loop: Runs the detect loop

View source: R/scheduler.R

detect_loopR 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 posts. If not provided the system will try to reuse the existing one from last session call of setup_config or use the EPI_HOME environment variable, default: NA

Details

The detect loop run the 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

detect_loop

generate_alerts

get_tasks

Examples

## Not run: 
   #Running the detect loop
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   detect_loop()

## End(Not run)

episomer documentation built on Nov. 26, 2026, 5:07 p.m.