Description Usage Arguments Details
sendResponse
takes the required inputs for a response, formats them appropriately, and
then sends the response.
1 2 | sendResponse(conn, queue, status = c("succeeded", "failed",
"catastrophic"), job, response, useJSON = F)
|
conn |
An open redux hiredis connection. |
queue |
A string giving the name of the queue where the response will be sent. |
status |
One of the following strings: "succeeded", "failed", or "catastrophic". |
job |
The job that was used to generate 'result'. |
response |
The result of executing the job. |
useJSON |
Flag specifying whether messages are in JSON format. Defaults to false. |
The response that will be sent back is the original 'job' with the addition of the 'status' property and one of the following two properties: 'error' or 'results'. If 'status' is either 'failed' or 'catastrophic', then 'response' will be placed in the 'error' property. If 'status' is 'succeeded' then 'response' will be placed in the 'response' property.
The 'failed' status should be used when the error occurred while executing the job and was handled. The 'catastrophic' status should be used whenever an unhandled error that trips the final try-catch occurs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.