TaskHook: set task function hook

Description Usage Arguments Value Examples

Description

set task function hook according to

Usage

1
2
3
4
5
6
7
8
setTaskHook(
  status = c("queued", "draft", "running", "completed", "aborted", "failed"),
  fun
)

getTaskHook(
  status = c("queued", "draft", "running", "completed", "aborted", "failed")
)

Arguments

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.

Value

object from setHook and getHook.

Examples

1
2
3
4
5
getTaskHook("completed")
setTaskHook("completed", function() {
  message("completed")
  return(TRUE)
})

sbg/sevenbridges-r documentation built on March 26, 2021, 3:33 p.m.