saisei | R Documentation |
When using daemons with dispatcher, regenerates the token for the URL a dispatcher socket listens at.
saisei(i, force = FALSE, .compute = "default")
i |
integer index number URL to regenerate at dispatcher. |
force |
[default FALSE] logical value whether to regenerate the URL even when there is an existing active connection. |
.compute |
[default 'default'] character compute profile (each compute profile has its own set of daemons for connecting to different resources). |
When a URL is regenerated, the listener at the specified socket is closed and replaced immediately, hence this function will only be successful if there are no existing connections at the socket (i.e. 'online' status shows 0), unless the argument 'force' is specified as TRUE.
If 'force' is specified as TRUE, the socket is immediately closed and regenerated. If this happens while a mirai is still ongoing, it will be returned as an errorValue 7 'Object closed'. This may be used to cancel a task that consistently hangs or crashes to prevent it from failing repeatedly when new daemons connect.
The regenerated character URL upon success, or else NULL.
if (interactive()) {
# Only run examples in interactive R sessions
daemons(1L)
Sys.sleep(1L)
status()
saisei(i = 1L, force = TRUE)
status()
daemons(0)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.