Description Usage Arguments Details
sendMessage
takes the required inputs for a request job, bundles them into the
correct format, and ships them off to the queue.
1 2 3 | sendMessage(conn, jobsQueue = "jobsQueue", package, func, ...,
resultsQueue = "resultsQueue", errorQueue = "errorQueue",
useJSON = F)
|
conn |
An open redux hiredis connection. |
jobsQueue |
A string giving the name of the queue where jobs will be placed.
Defaults to |
package |
A string giving the name of the package containing the function to execute. |
func |
The name of the function in |
... |
All parameters to be passed to |
resultsQueue |
A string giving the name of the queue to send results to. Defaults to "resultsQueue". |
errorQueue |
A string giving the name of the queue to send errors to. Defaults to "errorQueue". |
useJSON |
Flag specifying whether jobs and results will be sent in JSON format. Defaults to false |
package
is the name of the package containing the function that will be executed.
func
is the name of the function, contained in the specified package, that you
wish to execute with this request. If useJSON
is false, func
can take any
type of parameter. If useJSON
is true, then func
should only take R data
as parameters that can be converted to and from JSON, i.e. strings, numbers, simple vectors,
etc.
parameters
is a named list of all the parameters to be passed to func
. The
names must match those of the parameters func
expects.
resultsQueue
will be a string with the name of the redis queue to store any
returned results in. Returned results will have a status
property set to "succeeded"
and a results
property containing the results of the function execution. Defaults
to "resultsQueue".
errorQueue
will be a string with the name of the redis queue to store any errors
thrown while running the job. Note that returned errors will have status
"failed" or
"catastrophic", so errorQueue
can match resultsQueue
and you can separate
message types by checking their status.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.