Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrc-ide/heartbeatr
:heartpulse::computer::heartpulse: Redis heartbeat support
https://github.com/mrc-ide/heartbeatr
Last synced: 7 days ago
JSON representation
:heartpulse::computer::heartpulse: Redis heartbeat support
- Host: GitHub
- URL: https://github.com/mrc-ide/heartbeatr
- Owner: mrc-ide
- License: other
- Created: 2015-04-11T07:13:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-14T13:35:32.000Z (over 3 years ago)
- Last Synced: 2024-11-06T02:31:02.263Z (about 2 months ago)
- Language: R
- Homepage: https://mrc-ide.github.io/heartbeatr
- Size: 168 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# heartbeatr
[![Project Status: WIP - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/latest/wip.svg)](http://www.repostatus.org/#wip)
[![R build status](https://github.com/mrc-ide/heartbeatr/workflows/R-CMD-check/badge.svg)](https://github.com/mrc-ide/heartbeatr/actions)
[![codecov.io](https://codecov.io/github/mrc-ide/heartbeatr/coverage.svg?branch=master)](https://codecov.io/github/mrc-ide/heartbeatr?branch=master)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](https://en.wikipedia.org/wiki/Dead_man%27s_switch). You can then monitor the key to detect failure in your process and re-queue/rerun/investigate as appropriate.
## Usage
```r
f <- function() {
h <- heartbeatr::heartbeat("mykey", 4)
# ... long running job here
# h$stop() # optional - will stop automatically once h is garbage collected
}
```## Installation
``` r
drat:::add("mrc-ide")
install.packges("heartbeatr")
```It is also possible to install directly from GitHub using `remotes` as
``` r
remotes::install_github("mrc-ide/heartbeatr", ugprade = FALSE)
```## License
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.