Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add init.R hook and use uuid package for UUIDs

  • Loading branch information...
commit 7c7496355ff6e4bae1b0914928882d128d632b50 1 parent 51b0c25
@s-u s-u authored
View
1  rcloud.support/DESCRIPTION
@@ -4,4 +4,5 @@ Version: 1.0-0
Author: Carlos Scheidegger <cscheid@research.att.com>, Simon Urbanek <urbanek@research.att.com>
Maintainer: Carlos Scheidegger <cscheid@research.att.com>
Description: It's used by RCloud internally.
+Imports: uuid
License: EPL
View
5 rcloud.support/R/rcloud.support.R
@@ -191,6 +191,11 @@ start.rcloud <- function(username="", ...) {
## generate per-session result UUID (optional, really)
.session$result.prefix.uuid <- generate.uuid()
+ ## last-minute updates (or custom initialization) to be loaded
+ ## NB: it should be really fast since it will cause connect delay
+ if (file.exists(fn <- file.path(.rc.conf$configuration.root, "init.R")))
+ source(fn, TRUE)
+
## per-user setup
if (nzchar(.session$username)) {
.session$username <- gsub("[^a-zA-Z0-9_.]+", "_", .session$username)
View
3  rcloud.support/R/uuid.R
@@ -3,8 +3,7 @@
.result.hash <- new.env(hash=TRUE, parent=emptyenv())
-# FIXME should use libuuid directly
-generate.uuid <- function() system("uuidgen", intern=TRUE);
+generate.uuid <- function() uuid::UUIDgenerate()
stash.result <- function(value) {
new.hash <- generate.uuid()
Please sign in to comment.
Something went wrong with that request. Please try again.