View source: R/heartbeat_loops.R
heartbeat | R Documentation |
The heartbeat loop updates the heartbeat key if the worker is still alive. If the kill key is set, the worker is killed. This function is called in a callr session.
heartbeat(
network_id,
config,
worker_id,
heartbeat_period,
heartbeat_expire,
pid
)
network_id |
( |
config |
(redux::redis_config) |
worker_id |
( |
heartbeat_period |
( |
heartbeat_expire |
( |
pid |
( |
NULL
# This example is not executed since Redis must be installed
config_local = redux::redis_config()
rush_plan(
config = config_local,
n_workers = 2,
lgr_thresholds = c(rush = "info"))
rush = rsh(network_id = "test_network")
fun = function(x1, x2, ...) list(y = x1 + x2)
rush$start_local_workers(
fun = fun,
heartbeat_period = 3,
heartbeat_expire = 9)
rush$stop_workers()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.