Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. R build status

If you run a long running calculation on a remote machine your calculation can fail if the machine falls over, the network goes down, or your code crashes R. This package provides a "heartbeat" service that uses Redis to periodically prevent a key from expiring, forming a dead man's switch. You can then monitor the key to detect failure in your process and re-queue/rerun/investigate as appropriate.


f <- function() {
  h <- heartbeatr::heartbeat("mykey", 4)
  # ... long running job here
  # h$stop() # optional - will stop automatically once h is garbage collected



It is also possible to install directly from GitHub using remotes as

remotes::install_github("mrc-ide/heartbeatr", ugprade = FALSE)


MIT + file LICENSE © Imperial College of Science, Technology and Medicine

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

richfitz/heartbeatr documentation built on Jan. 7, 2021, 2:03 p.m.