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.
Arguments
- network_id
(
character(1)
)
Identifier of the rush network. Controller and workers must have the same instance id. Keys in Redis are prefixed with the instance id.- config
(redux::redis_config)
Redis configuration options.- worker_id
(
character(1)
)
Identifier of the worker. Keys in redis specific to the worker are prefixed with the worker id.- heartbeat_period
(
integer(1)
)
Period of the heartbeat in seconds. The heartbeat is updated everyheartbeat_period
seconds.- heartbeat_expire
(
integer(1)
)
Time to live of the heartbeat in seconds. The heartbeat key is set to expire afterheartbeat_expire
seconds.- pid
(
integer(1)
)
Process ID of the worker.