Description Usage Arguments Examples
Sends a signal to a heartbeat process that is using key key
1 | heartbeat_send_signal(con, key, signal)
|
con |
A hiredis object |
key |
The heartbeat key |
signal |
A signal to send (e.g. |
1 2 3 4 5 6 7 8 9 10 11 12 | if (redux::redis_available()) {
rand_str <- function() {
paste(sample(letters, 20, TRUE), collapse = "")
}
# Suppose we have a process that exposes a heartbeat running on
# this key:
key <- sprintf("heartbeatr:test:%s", rand_str())
# We can send it an interrupt over redis using:
con <- redux::hiredis()
heartbeatr::heartbeat_send_signal(con, key, tools::SIGINT)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.