| runHook {batchtools} | R Documentation |
Trigger Evaluation of Custom Function
Description
Hooks allow to trigger functions calls on specific events.
They can be specified via the ClusterFunctions and are triggered on the following events:
pre.syncfunction(reg, fns, ...): Run before synchronizing the registry on the master.fnis the character vector of paths to the update files.post.syncfunction(reg, updates, ...): Run after synchronizing the registry on the master.updatesis the data.table of processed updates.pre.submit.jobfunction(reg, ...): Run before a job is successfully submitted to the scheduler on the master.post.submit.jobfunction(reg, ...): Run after a job is successfully submitted to the scheduler on the master.pre.submitfunction(reg, ...): Run before any job is submitted to the scheduler.post.submitfunction(reg, ...): Run after a jobs are submitted to the schedule.pre.do.collectionfunction(reg, reader, ...): Run before starting the job collection on the slave.readeris an internal cache object.post.do.collectionfunction(reg, updates, reader, ...): Run after all jobs in the chunk are terminated on the slave.updatesis adata.tableof updates which will be merged with theRegistryby the master.readeris an internal cache object.pre.killfunction(reg, ids, ...): Run before any job is killed.post.killfunction(reg, ids, ...): Run after jobs are killed.idsis the return value ofkillJobs.
Usage
runHook(obj, hook, ...)
Arguments
obj |
[Registry | JobCollection] |
hook |
[ |
... |
[ANY] |
Value
Return value of the called function, or NULL if there is no hook
with the specified ID.