From c4266c4fba928e0da6287b4e303f17e5efc7d193 Mon Sep 17 00:00:00 2001 From: Phil Maddox Date: Wed, 6 Apr 2016 21:09:37 +0000 Subject: [PATCH] Add Separate Value, "seconds_back", to Work With minutes_back Was just altering minutes_back to reflect seconds; this could be confusing. Added new variable, "seconds_back", to convert into seconds. --- src/modules-lua/noit/AWSClient.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules-lua/noit/AWSClient.lua b/src/modules-lua/noit/AWSClient.lua index 4a177ed03..1ab1a3d47 100644 --- a/src/modules-lua/noit/AWSClient.lua +++ b/src/modules-lua/noit/AWSClient.lua @@ -215,8 +215,7 @@ function AWSClient:perform(target, cache_table) local region = self.params.region local service = self.params.service local minutes_back = self.params.minutes_back or "10"; - - minutes_back = minutes_back * 60; + local seconds_back = minutes_back * 60; local time = os.time() local datestamp=os.date("!%Y%m%d", time) @@ -231,7 +230,7 @@ function AWSClient:perform(target, cache_table) start_time = os.date("!%Y-%m-%dT%H:%M:%S.000Z", time-(60*60*8)) end_time = os.date("!%Y-%m-%dT%H:%M:%S.000Z", time+300) else - start_time = os.date("!%Y-%m-%dT%H:%M:%S.000Z", time-minutes_back) + start_time = os.date("!%Y-%m-%dT%H:%M:%S.000Z", time-seconds_back) end_time = os.date("!%Y-%m-%dT%H:%M:%S.000Z", time+300) end local uri = ""