Add and remove arbitrary tags to jobs.
addJobTags(ids = NULL, tags, reg = getDefaultRegistry()) removeJobTags(ids = NULL, tags, reg = getDefaultRegistry()) getUsedJobTags(ids = NULL, reg = getDefaultRegistry())
ids | [ |
---|---|
tags | [ |
reg | [ |
[data.table
] with job ids affected (invisible).
#>#>#>#> job.id tags #> 1: 1 needs.computation #> 2: 2 needs.computation #> 3: 3 needs.computation #> 4: 4 needs.computation #> 5: 5 needs.computation #> 6: 6 needs.computation #> 7: 7 needs.computation# Add more tags addJobTags(findJobs(x < 0, reg = tmp), "x.neg", reg = tmp) addJobTags(findJobs(x > 0, reg = tmp), "x.pos", reg = tmp) getJobTags(reg = tmp)#> job.id tags #> 1: 1 needs.computation,x.neg #> 2: 2 needs.computation,x.neg #> 3: 3 needs.computation,x.neg #> 4: 4 needs.computation #> 5: 5 needs.computation,x.pos #> 6: 6 needs.computation,x.pos #> 7: 7 needs.computation,x.pos#>#> Warning: NaNs produced#> Warning: NaNs produced#> Warning: NaNs producedif (waitForJobs(reg = tmp)) removeJobTags(ids, "needs.computation", reg = tmp) getJobTags(reg = tmp)#> job.id tags #> 1: 1 x.neg #> 2: 2 x.neg #> 3: 3 x.neg #> 4: 4 <NA> #> 5: 5 x.pos #> 6: 6 needs.computation,x.pos #> 7: 7 needs.computation,x.pos# Grep for warning message and add a tag addJobTags(grepLogs(pattern = "NaNs produced", reg = tmp), "div.zero", reg = tmp) getJobTags(reg = tmp)#> job.id tags #> 1: 1 x.neg #> 2: 2 x.neg #> 3: 3 x.neg #> 4: 4 <NA> #> 5: 5 x.pos #> 6: 6 needs.computation,x.pos #> 7: 7 needs.computation,x.pos# All tags where tag x.neg is set: ids = findTagged("x.neg", reg = tmp) getUsedJobTags(ids, reg = tmp)#> [1] "x.neg"