runners: Registers the fs_monitor for the current process or exits

register_fs_monitorR Documentation

Registers the fs_monitor for the current process or exits

Description

registers the fs_monitor (by writing fs.monitor.PID file) for the current process or stops if no configuration has been set or if it is already running

registers the social media message collection task or stops if no configuration has been set or if it is already running

stops the post collection task

registers the alert detection task or stops if no configuration has been set or if it is already running

stops the alert detection task

registers the episomer database task or stops if no configuration has been set or if it is already running

stops all episomer runner tasks

starts all episomer runner tasks

stops the episomer database task

check if search jobs for each activated social media are running and return the list names of social media with missing jobs

gets the post collection execution status

gets the database runner execution status

gets the alert detection runner execution status

Usage

register_fs_monitor()

register_search_runner_task()

stop_search_runner_task()

register_detect_runner_task()

stop_detect_runner_task()

register_fs_runner_task(
  wait_until_response = FALSE,
  bind_host = NULL,
  bind_port = NULL,
  timeout = Inf
)

stop_all_runner_tasks()

start_all_runner_tasks()

stop_fs_runner_task(timeout = 60)

missing_search_jobs()

is_search_running()

is_fs_running()

is_detect_running()

Arguments

wait_until_response

Logical, whether to block until the fs runner answers on is_fs_running before returning, default FALSE

bind_host

Character, the interface the database has to bind for this run instead of the configured conf$fs_url, with or without a scheme ("localhost" and "http://localhost" are both accepted), default: NULL

bind_port

Numeric, the port the database has to bind for this run instead of the configured conf$fs_port, default: NULL

timeout

Numeric how many seconds to wait for the database service to stop answering before giving up, default: 60

Details

Registers the fs_monitor (by writing fs.monitor.PID file) for the current process or stops if no configuration has been set or if it is already running This function has been exported so it can be properly called from the future package on the database runner, but it is not intended to be directly called by end users.

Registers the message collextion task or stops if no configuration has been set or if it is already running. Bluesky authentication needs to be previously set on the shiny app or by calling set_auth(). You can test if authentication is working on the shiny app troubleshot page or by calling (with dplyr): episomer::check_all() This function will use the task scheduler on windows and will fall back to launching the runner as a separate process (attached to this session) on Linux.

Stops the post collection task if it is already running This function will try also deactivate the respective scheduled task on Windows.

Registers the alert detection task or stops if no configuration has been set or if it is already running. To generate alerts, this task needs the post collection to had successfully run since the last time it ran. This function will use the task scheduler on windows and will fall back to launching the runner as a separate process (attached to this session) on Linux.

Stops the alert detection task if it is already running This function will try also deactivate the respective scheduled task on Windows.

Registers the episomer database task or stops if no configuration has been set or if it is already running. This task need the dependencies, geonames and languages steps to have been successfully ran. This can be done on the shiny app configuration page or by manually running the detect_runner_task. This function will try to use the task scheduler on windows and will fall back to launching the runner as a separate process (attached to this session) on Linux.

bind_host and bind_port start a database that is deliberately *not* on the configured address, for a caller that needs one for itself: the language model retraining of setup needs a running database, and it must not be mistaken for the real service by whatever waits for that service to become healthy before starting (depends_on: service_healthy in docker/compose.yml, a readiness probe in Kubernetes). They travel to the database as command line arguments - jobs/fs.R, then fs_loop, then the Scala API.run() - and nothing about them is written to properties.json, so a process killed outright leaves no trace behind. Every call the current process makes to the API goes to that address until clear_fs_endpoint_override() is called or the process ends.

"localhost" is the value to give bind_host in a container orchestrator: an address reachable from inside the pod only, needing no exposed port and no service routing, and therefore reachable even while the pod is still unready.

A database given either of them is always started attached to this session, on Windows as everywhere else, and never as a Windows scheduled task: it is meant to live for the length of one call, and a scheduled task would both outlive it and truncate its command line.

Stops the detect loop, the search loop and the fs loop This function will try also deactivate the respective scheduled task on Windows.

Starts the detect loop, the search loop and the fs loop This function will try also register the respective scheduled task on Windows.

Stops the episomer database task if it is already running This function will try also deactivate the respective scheduled task on Windows.

returns a char vector with the name of missing social media. The answer is cluster-wide: it is read from the runner leases ('<data_dir>/runners/'), so a social media collected by another machine sharing the same database is not reported as missing.

returns a logical value being TRUE if the post collection is running, on this machine *or on any other machine* sharing the same episomer database: the status is read from the runner leases and not from the local PID files. A service that stopped without releasing its lease is reported as running until its lease expires ('runner_ttl_search' seconds), unless it crashed on this very machine, which is detected at once.

returns a logical value being TRUE if the database runner is actually running. Unlike the other services this one is not answered by the runner lease but by an HTTP call to the database '/ping' endpoint: it is instantaneous, it needs no TTL, and it tells whether the service *answers* rather than whether some process holds its lease. The 'fs' runner does take a lease, for a different purpose - stopping a second database from opening the same storage.

returns a logical value being TRUE if the alert detection task is actually running, on this machine or on any other machine sharing the same episomer database - see is_search_running for what the runner leases can and cannot tell.

Value

Nothing

Nothing

Nothing

Nothing

Nothing

Nothing

Nothing

Nothing

Nothing

char list of social media with no search job running

logical Whether the post collection is running

logical Whether the database is running

logical Whether the alert detection task is running

Examples

## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   register_fs_monitor()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   register_search_runner_task()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   stop_search_runner_task()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   register_detect_runner_task()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   stop_detect_runner_task()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   register_fs_runner_task()

   # a database only this process can see, on a port of its own
   register_fs_runner_task(wait_until_response = TRUE, bind_host = "localhost", bind_port = 9080)

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   stop_all_runner_tasks()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   start_all_runner_tasks()

## End(Not run)
## Not run: 
   #getting tasks statuses
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   stop_fs_runner_task()

## End(Not run)
## Not run: 
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   missing_search_jobs()

## End(Not run)
## Not run: 
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   is_search_running()

## End(Not run)
## Not run: 
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   is_fs_running()

## End(Not run)
## Not run: 
   library(episomer)
   message('Please choose the episomer data directory')
   setup_config(file.choose())
   is_detect_running()

## End(Not run)

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