When I comment out the thread related code below, the submission to the slack API works as expected. However, when I attempt to process the submission within a thread command, the submission never goes through.
Am I doing something wrong? Running in Railo 4
// push to slack!
public function push(options = {}) {
var http = new http();
var data = {
"text": "Default message",
"channel": "activity"
};
structAppend(data, options);
// thread
// action="run" {
sleep(5000);
http.setMethod("post");
http.setUrl(variables.slackWebhookUrl);
http.addParam(
type = "formField",
name = "payload",
value = serializeJson(data)
);
http.send();
// }
}