From cd2a642c31106910b0137d19c77b0a9b40b45039 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 20 Sep 2023 14:57:14 +0000 Subject: [PATCH] Bug 34587: Fix dry run and end date in the cronjob The cronjob always logs a dry run even on a live harvest and the end date parameter was not working correctly. This patch addresses both issues Signed-off-by: Jessica Zairo Signed-off-by: Michaela Sieber Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/erm_run_harvester.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/erm_run_harvester.pl b/misc/cronjobs/erm_run_harvester.pl index 8b0c9ed540..0d0f9283a9 100755 --- a/misc/cronjobs/erm_run_harvester.pl +++ b/misc/cronjobs/erm_run_harvester.pl @@ -54,7 +54,7 @@ unless ($begin_date) { die "ERROR: Please specify a begin-date"; } -debug_msg("Dry run: Harvests will not be enqueued"); +debug_msg("Dry run: Harvests will not be enqueued") if $dry_run; while ( my $udprovider = $udproviders->next ) { debug_msg( sprintf( @@ -63,7 +63,7 @@ while ( my $udprovider = $udproviders->next ) { ); my $harvest_begin_date = dt_from_string($begin_date); - my $harvest_end_date = $end_date || dt_from_string(); + my $harvest_end_date = dt_from_string($end_date) || dt_from_string(); if ( $harvest_begin_date > $harvest_end_date ) { die sprintf( -- 2.39.5