q.wait <- function(jid, timer=1)
{
# extract jid
for(i in 1: length(jid))
jid[i] <- basename(jid[i])
while(TRUE)
{
OUTBOX <- dir(sprintf("%s/outbox",.pkg.log$log.dir))
FAILED <- dir(sprintf("%s/failed",.pkg.log$log.dir))
DONE.JOB <- c(OUTBOX,FAILED)
Done.List <- jid %in% DONE.JOB
if(all(Done.List)) return(TRUE) else
message(sprintf('remaining %s jobs to complete', sum(!Done.List)))
Sys.sleep(timer)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.