From 6ea08bf74f9ff663923b022fba0aed2d860c6575 Mon Sep 17 00:00:00 2001 From: sagIoTPower Date: Tue, 14 May 2024 08:31:20 +0200 Subject: [PATCH] removed timer configuration, not required --- repository/blocks/EnhancedHttpOutputBlock.mon | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/repository/blocks/EnhancedHttpOutputBlock.mon b/repository/blocks/EnhancedHttpOutputBlock.mon index bc911d0..b337b2d 100644 --- a/repository/blocks/EnhancedHttpOutputBlock.mon +++ b/repository/blocks/EnhancedHttpOutputBlock.mon @@ -27,12 +27,11 @@ using com.softwareag.connectivity.httpclient.Response; event HTTPHandler { string deviceId; - float timeout; string host; /** Handle the HTTP response.*/ action handleResponse(Response res) { - // $base.createTimer(($parameters.timeout.toFloat() / 1000.0), res); // Creates a timer with the specified duration. - TimerParams tp := TimerParams.relative(timeout).withPayload(res).withPartition(deviceId); + // $base.createTimer(0.01, res); // Creates a timer with the specified duration. + TimerParams tp := TimerParams.relative(0.01).withPayload(res).withPartition(deviceId); log "Called handleResponse: " + res.payload.data.toString() at INFO; if not res.isSuccess() { @@ -88,15 +87,6 @@ event EnhancedHTTPOutput_$Parameters { /**Default value for wrapBody.*/ constant boolean $DEFAULT_wrapBody := true; - /** - * Timeout. - * - * The timeout in ms for the call. - */ - integer timeout; - /**Default value for timeout.*/ - constant integer $DEFAULT_timeout := 1; // 1ms - /** Validate that the values for all the parameters have been provided. */ action $validate() { BlockBase.throwsOnEmpty(host, "host", self); @@ -196,7 +186,7 @@ event EnhancedHTTPOutput { // Execute the request and pass the callback action. string deviceId := $activation.partition.toString(); log "Processing for partition: " + deviceId at INFO; - req.execute(HTTPHandler(deviceId, $parameters.timeout.toFloat() / 1000.0, $parameters.host).handleResponse); + req.execute(HTTPHandler(deviceId, $parameters.host).handleResponse); $base.profile(BlockBase.PROFILE_OUTPUT); }