| queue | R Documentation |
queue R6 class, for queueing mutant jobs
q(liteq_queue) the liteq queue object
qpath(character) path to the queue on disk
print()print method for queue objects
queue$print(x, ...)
xself
...ignored
new()Create a new queue object
queue$new(temporary = TRUE)
temporary(logical) create a temporary queue that is cleaned up
at the end of your R session? default: TRUE. if FALSE, we use
rappdirs::user_data_dir() to cache the file. use $queue_path()
to get the path for the queue
A new queue object
publish()publish a job into the queue
queue$publish(message, title = uuid::UUIDgenerate())
message(character) job message, a JSON string with fields
path and mutant_location, for the file path to the mutated
package to test and information on the location of the mutation,
respectively
title(character) job title, a UUID, generated from
uuid::UUIDgenerate()
consume()consume a job from the queue
queue$consume()
done()tell the queue the job can be removed from the queue
queue$done(message)
message(character) message object, of class liteq_message
messages()list jobs in the queue
queue$messages()
count()count jobs in the queue
queue$count()
queue_path()fetch the queue path. NULL if there's no queue
queue$queue_path()
destroy()destroy the queue - in practice this only means deleting the SQLite file
queue$destroy()
clone()The objects of this class are cloneable with this method.
queue$clone(deep = FALSE)
deepWhether to make a deep clone.
## Not run:
x <- queue$new()
x
x$q
x$queue_path()
x$messages()
z <- list(
path = tempfile(),
mutant_location = list(
`some-file.R` =
list(line1 = 45, line2 = 46, column = 4, from = "==", to = ">")))
x$publish(as.character(jsonlite::toJSON(z)))
x
x$messages()
mssg <- x$consume()
mssg
mssg$title
mssg$message
jsonlite::fromJSON(mssg$message)
x$messages()
x$done(mssg)
x$messages()
x
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.