From 01053f9d416ab9816759824dc635c8dcb77293b3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Feb 2022 17:21:49 +0100 Subject: maintenance: Log deletion notification to stdout --- lib/Travelynx/Command/maintenance.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Travelynx/Command/maintenance.pm b/lib/Travelynx/Command/maintenance.pm index 58189ff..35264e4 100644 --- a/lib/Travelynx/Command/maintenance.pm +++ b/lib/Travelynx/Command/maintenance.pm @@ -14,10 +14,10 @@ has usage => sub { shift->extract_usage }; sub run { my ( $self, $filename ) = @_; - my $now = DateTime->now( time_zone => 'Europe/Berlin' ); - my $verification_deadline = $now->clone->subtract( hours => 48 ); - my $deletion_deadline = $now->clone->subtract( hours => 72 ); - my $old_deadline = $now->clone->subtract( years => 1 ); + my $now = DateTime->now( time_zone => 'Europe/Berlin' ); + my $verification_deadline = $now->clone->subtract( hours => 48 ); + my $deletion_deadline = $now->clone->subtract( hours => 72 ); + my $old_deadline = $now->clone->subtract( years => 1 ); my $old_notification_deadline = $now->clone->subtract( weeks => 4 ); my $db = $self->app->pg->db; @@ -93,6 +93,7 @@ sub run { ); for my $user ( $to_notify->hashes->each ) { + say "Sending account deletion notification to uid $user->{id}..."; $self->app->sendmail->age_deletion_notification( name => $user->{name}, email => $user->{email}, -- cgit v1.2.3