Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from jread-usgs/wait
Wait
- Loading branch information
Showing
15 changed files
with
118 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
|
||
#' @title hold up R while GDP is processing | ||
#' @description keeps R in a loop while GDP works on the request. | ||
#' Checks \code{\link{running}}. Will drop out of loop whenever !running(geojob) | ||
#' @keywords internal | ||
#' hold up R while GDP is processing | ||
#' | ||
waitUntilFinished <- function(.Object, sleep.time = gconfig('sleep.time')){ | ||
#' keeps R in a loop while GDP works on the request. Checks \code{\link{running}}. | ||
#' Will drop out of loop whenever !running(geojob) | ||
#' | ||
#' @param .Object a geojob | ||
#' @param sleep.time a number of seconds to wait in between checking the process | ||
#' @return invisible return of .Object, unaltered | ||
#' @examples | ||
#' \dontrun{ | ||
#' job <- geoknife(stencil = c(-89,42), fabric = 'prism') | ||
#' 2+2 | ||
#' wait(job) | ||
#' check(job) # should be complete | ||
#' } | ||
#' @export | ||
wait <- function(.Object, sleep.time = gconfig('sleep.time')){ | ||
running <- running(.Object, retry = TRUE) | ||
while(running){ | ||
Sys.sleep(sleep.time) | ||
running <- running(.Object, retry = TRUE) | ||
} | ||
invisible(.Object) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
## Resubmission | ||
This is a resubmission. In this version I have: | ||
|
||
* Added a new output type to data subsets (geotiff) | ||
* Added a new vignette (plotting geotiffs) | ||
|
||
* Modified the GET and POST requests to work correctly with the release and dev version of the httr package | ||
* Modified the GET and POST requests to capture a warning message from the new CRAN version of the httr package | ||
|
||
* improved documentation | ||
* Added a new feature that allows users to turn on a verbose mode for web requests, and also set defaults for a number of variables. | ||
|
||
* Fixed the CITATION file DOI, which was improperly formatted | ||
|
||
### a note about geoknife URLs: | ||
this package has a numer of service URLs that can be found in code, | ||
in help text, and in vignettes. Some of these URLs will return 404s | ||
without the proper POST body | ||
(e.g., http://cida.usgs.gov/gdp/process/WebProcessingService). These | ||
should be ignored for the purpose of testing valid urls. | ||
* Removed urls in the vignette that cause 404s to url checks (as they are urls that receive POST bodies, not GET/HEAD requests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters