Add resourceGroup argument when polling for script actions #58
This commit is contained in:
Родитель
37d1e9e883
Коммит
c72b18926c
|
@ -457,8 +457,11 @@ azureRunScriptAction <- function(azureActiveContext, scriptname, scriptURL,
|
|||
stopWithAzureError(r)
|
||||
|
||||
azureActiveContext$clustername <- clustername
|
||||
azureActiveContext$resourceGroup <- resourceGroup
|
||||
|
||||
|
||||
message("Accepted")
|
||||
if (wait) pollStatusScriptAction(azureActiveContext, scriptname = scriptname)
|
||||
if (wait) pollStatusScriptAction(azureActiveContext, scriptname = scriptname, resourceGroup = resourceGroup)
|
||||
return(TRUE)
|
||||
}
|
||||
|
||||
|
@ -497,7 +500,7 @@ azureScriptActionHistory <- function(azureActiveContext, resourceGroup,
|
|||
r <- GET(URL, azureApiHeaders(azToken), verbosity)
|
||||
stopWithAzureError(r)
|
||||
|
||||
rc <- content(r)$value
|
||||
rc <- content(r, bigint_as_char = TRUE)$value
|
||||
if (length(rc) == 0) {
|
||||
message("No script action history found")
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ pollStatusHDI <- function(azureActiveContext, clustername) {
|
|||
}
|
||||
|
||||
|
||||
pollStatusScriptAction <- function(azureActiveContext, scriptname) {
|
||||
pollStatusScriptAction <- function(azureActiveContext, scriptname, resourceGroup) {
|
||||
|
||||
message("Script action request submitted: ", Sys.time())
|
||||
message("Key: A - accepted, (.) - in progress, S - succeeded, E - error, F - failed")
|
||||
|
@ -134,7 +134,8 @@ pollStatusScriptAction <- function(azureActiveContext, scriptname) {
|
|||
waiting <- TRUE
|
||||
while (iteration < 500 && waiting) {
|
||||
|
||||
status <- azureScriptActionHistory(azureActiveContext)
|
||||
status <- azureScriptActionHistory(azureActiveContext,
|
||||
resourceGroup = resourceGroup)
|
||||
idx <- which(sapply(status, "[[", "name") == scriptname)[1]
|
||||
summary <- status[[idx]]$status
|
||||
rc <- switch(tolower(summary),
|
||||
|
|
Загрузка…
Ссылка в новой задаче