Skip to content

Commit 90d0098

Browse files
Merge pull request #7 from meantrix/develop
0.0.6
2 parents f36be76 + 6cc4ee5 commit 90d0098

File tree

11 files changed

+87
-64
lines changed

11 files changed

+87
-64
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## Async 0.0.6
4+
5+
- Fix `async$get_status` due to scan read error ;
6+
37
## Async 0.0.5
48

59
- Fix `asyncBar2` behaviour where abortion notification was dismissed before the abortion was concluded. The `removeNotification` is now called on `finalize` method;

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: async
22
Type: Package
33
Title: Async
4-
Version: 0.0.5
4+
Version: 0.0.6
55
Authors@R:
66
c(person(
77
given = "Igor",
@@ -23,4 +23,4 @@ Depends:
2323
License: MIT License
2424
Encoding: UTF-8
2525
LazyData: true
26-
RoxygenNote: 7.1.1
26+
RoxygenNote: 7.2.1

R/async.R

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,27 @@ async = R6::R6Class(classname = 'async',
4747
.reactive =TRUE,
4848

4949
get_status = function(){
50-
vm = scan(private$vars$status_file,
50+
. = NULL
51+
vm = try(
52+
(scan(private$vars$status_file,
5153
what = "character",
52-
sep="\n",quiet = TRUE)
53-
54-
if(private$vars$verbose){
55-
message(paste0("get status: ",vm))
56-
}
57-
58-
vm = try(stringr::str_split(vm,' zzzz ')[[1]])
54+
sep="\n",quiet = TRUE) %>%
55+
stringr::str_split(.,' zzzz '))[[1]] ,
56+
silent = TRUE
57+
)
5958

6059
if(!inherits(vm,'try-error')){
60+
if(private$vars$verbose) message(paste0("get status: ",vm))
6161
names(vm) = c('value','message','detail')
6262
private$vars$vm = vm
6363
return(vm)
6464
}
6565

66+
if(private$vars$verbose){
67+
message("Async: cant open tempfile: ", private$vars$status_file)
68+
}
69+
NULL
70+
6671
},
6772

6873
set_status = function(value, msg = "",detail=""){
@@ -77,8 +82,6 @@ async = R6::R6Class(classname = 'async',
7782
vm.out = stringr::str_split(vm,' zzzz ')[[1]]
7883
names(vm.out) = c('value','message','detail')
7984

80-
81-
8285
private$vars$vm = vm.out
8386

8487

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![logo](https://github.com/meantrix/async/blob/develop/inst/header_transparente_colorido.png)
44

55
<!--- These are examples. See https://shields.io for others or to customize this set of shields. You might want to include dependencies, project status and licence info here --->
6-
[![version](https://img.shields.io/badge/version-0.0.5-green.svg)](https://semver.org)
6+
[![version](https://img.shields.io/badge/version-0.0.6-green.svg)](https://semver.org)
77

88

99
async is a `tool` for passing messages between some R processes

man/async.Rd

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/asyncBar1.Rd

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/asyncBar2.Rd

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
80.2 KB
Binary file not shown.
254 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)