( c *gin.Context, machine *relay.PluginResponsesMachine, lastStatus string, )
| 1151 | } |
| 1152 | |
| 1153 | func writeTaskPluginProtocolTimeoutResponse( |
| 1154 | c *gin.Context, |
| 1155 | machine *relay.PluginResponsesMachine, |
| 1156 | lastStatus string, |
| 1157 | ) { |
| 1158 | response, err := machine.TimeoutResponse(lastStatus) |
| 1159 | if err != nil { |
| 1160 | logger.LogError(c, common.LogText("task protocol timeout response failed: %s", err.Error())) |
| 1161 | respondPluginProtocolError(c, http.StatusInternalServerError, "task_protocol_error", "Task protocol request failed") |
| 1162 | return |
| 1163 | } |
| 1164 | c.JSON(http.StatusOK, response) |
| 1165 | } |
| 1166 | |
| 1167 | // taskPluginProtocolJSONValue encodes a task view for a hook, which receives |
| 1168 | // it parsed from the text. |
no test coverage detected