Loading lib/Travelynx/Command/maintenance.pm +1 −9 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ sub run { my ( $self, $filename ) = @_; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_deadline = $now->clone->subtract( hours => 48 ); my $verification_deadline = $now->clone->subtract( hours => 48 ); my $deletion_deadline = $now->clone->subtract( hours => 72 ); my $old_deadline = $now->clone->subtract( years => 1 ); Loading @@ -23,13 +22,6 @@ sub run { my $db = $self->app->pg->db; my $tx = $db->begin; my $res = $db->delete( 'in_transit', { checkin_time => { '<', $checkin_deadline } } ); if ( my $rows = $res->rows ) { printf( "Removed %d incomplete checkins\n", $rows ); } my $unverified = $db->select( 'users', 'id, email, extract(epoch from registered_at) as registered_ts', Loading Loading @@ -76,7 +68,7 @@ sub run { printf( "Pruned unverified user %d\n", $user->{id} ); } $res = $db->delete( 'pending_passwords', my $res = $db->delete( 'pending_passwords', { requested_at => { '<', $verification_deadline } } ); if ( my $rows = $res->rows ) { Loading lib/Travelynx/Command/work.pm +10 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,18 @@ sub run { my ($self) = @_; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_deadline = $now->clone->subtract( hours => 48 ); my $json = JSON->new; my $db = $self->app->pg->db; my $res = $db->delete( 'in_transit', { checkin_time => { '<', $checkin_deadline } } ); if ( my $rows = $res->rows ) { $self->app->log->debug("Removed ${rows} incomplete checkins"); } for my $entry ( $db->select( 'in_transit_str', '*', { cancelled => 0 } )->hashes->each ) { Loading Loading
lib/Travelynx/Command/maintenance.pm +1 −9 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ sub run { my ( $self, $filename ) = @_; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_deadline = $now->clone->subtract( hours => 48 ); my $verification_deadline = $now->clone->subtract( hours => 48 ); my $deletion_deadline = $now->clone->subtract( hours => 72 ); my $old_deadline = $now->clone->subtract( years => 1 ); Loading @@ -23,13 +22,6 @@ sub run { my $db = $self->app->pg->db; my $tx = $db->begin; my $res = $db->delete( 'in_transit', { checkin_time => { '<', $checkin_deadline } } ); if ( my $rows = $res->rows ) { printf( "Removed %d incomplete checkins\n", $rows ); } my $unverified = $db->select( 'users', 'id, email, extract(epoch from registered_at) as registered_ts', Loading Loading @@ -76,7 +68,7 @@ sub run { printf( "Pruned unverified user %d\n", $user->{id} ); } $res = $db->delete( 'pending_passwords', my $res = $db->delete( 'pending_passwords', { requested_at => { '<', $verification_deadline } } ); if ( my $rows = $res->rows ) { Loading
lib/Travelynx/Command/work.pm +10 −2 Original line number Diff line number Diff line Loading @@ -18,10 +18,18 @@ sub run { my ($self) = @_; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_deadline = $now->clone->subtract( hours => 48 ); my $json = JSON->new; my $db = $self->app->pg->db; my $res = $db->delete( 'in_transit', { checkin_time => { '<', $checkin_deadline } } ); if ( my $rows = $res->rows ) { $self->app->log->debug("Removed ${rows} incomplete checkins"); } for my $entry ( $db->select( 'in_transit_str', '*', { cancelled => 0 } )->hashes->each ) { Loading