Skip to content

Commit

Permalink
Add Separate Value, "seconds_back", to Work With minutes_back
Browse files Browse the repository at this point in the history
Was just altering minutes_back to reflect seconds; this could be
confusing. Added new variable, "seconds_back", to convert into seconds.
  • Loading branch information
pamaddox committed Apr 6, 2016
1 parent 10dcb1f commit c4266c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/modules-lua/noit/AWSClient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 = ""
Expand Down

0 comments on commit c4266c4

Please sign in to comment.