зеркало из https://github.com/Azure/AzureStor.git
progress bar fixes
This commit is contained in:
Родитель
2efabb3987
Коммит
abf3ee226c
1
NEWS.md
1
NEWS.md
|
@ -4,6 +4,7 @@
|
|||
- Creating a service-specific endpoint (`file_endpoint`, `blob_endpoint`, `adls_endpoint`) with an invalid URL will now warn, instead of throwing an error. This enables using tools like Azurite, which use a local address as the endpoint. Calling `storage_endpoint` with an invalid URL will still throw an error, as the function has no way of telling which storage service is required.
|
||||
- Remove the warning about ADLSgen2 not supporting shared access signatures (SAS).
|
||||
- Background process pool functionality has been moved to AzureRMR. This removes code duplication, and also makes it available for other packages that may benefit.
|
||||
- Only display the file transfer progress bar in an interactive session.
|
||||
|
||||
# AzureStor 2.1.1
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ public=list(
|
|||
|
||||
initialize=function(size, direction)
|
||||
{
|
||||
self$display <- isTRUE(getOption("azure_storage_progress_bar"))
|
||||
if(self$display)
|
||||
self$display <- isTRUE(getOption("azure_storage_progress_bar")) && interactive()
|
||||
if(self$display && size > 0)
|
||||
{
|
||||
self$direction <- direction
|
||||
self$offset <- 0
|
||||
|
@ -22,7 +22,7 @@ public=list(
|
|||
|
||||
update=function()
|
||||
{
|
||||
if(!self$display) return(NULL)
|
||||
if(!self$display || is.null(self$bar)) return(NULL)
|
||||
|
||||
func <- function(down, up)
|
||||
{
|
||||
|
@ -39,6 +39,6 @@ public=list(
|
|||
|
||||
close=function()
|
||||
{
|
||||
if(self$display) close(self$bar)
|
||||
if(self$display && !is.null(self$bar)) close(self$bar)
|
||||
}
|
||||
))
|
||||
|
|
Загрузка…
Ссылка в новой задаче