From dd938757433d732d83c294cdb7dc2b569772b68a Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 16 Jun 2020 10:00:51 +0200 Subject: [PATCH] Fix cloudwatchlogs --- cloud/aws/cloudwatchlogs/mode/getlogs.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/aws/cloudwatchlogs/mode/getlogs.pm b/cloud/aws/cloudwatchlogs/mode/getlogs.pm index 95eef9434..766a31444 100644 --- a/cloud/aws/cloudwatchlogs/mode/getlogs.pm +++ b/cloud/aws/cloudwatchlogs/mode/getlogs.pm @@ -109,6 +109,7 @@ sub check_options { sub manage_selection { my ($self, %options) = @_; + my $current_time = time(); if (!defined($self->{start_time})) { $self->{statefile_cache}->read( statefile => @@ -117,7 +118,6 @@ sub manage_selection { (defined($self->{stream_names}) ? md5_hex(join('-', @{$self->{stream_names}})) : md5_hex('all')) ); $self->{start_time} = $self->{statefile_cache}->get(name => 'last_time'); - my $current_time = time(); $self->{statefile_cache}->write(data => { last_time => $current_time }); if (!defined($self->{start_time})) {