set task function hook according to
setTaskHook( status = c("queued", "draft", "running", "completed", "aborted", "failed"), fun ) getTaskHook( status = c("queued", "draft", "running", "completed", "aborted", "failed") )
status | one of "queued", "draft", "running", "completed", "aborted", or "failed". |
---|---|
fun | function it must return a TRUE or FALSE in the end of function body, when it's TRUE this function will also terminate monitor process, if FALSE, function called, but not going to terminate task monitoring process. |
object from setHook and getHook.
getTaskHook("completed")#> function(...) { #> cat("\r", "completed") #> return(TRUE) #> } #> <environment: 0x7f93442681d0>