From e2b756f06e48c3d337b04085cd4ae23cbc09f3d6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 4 Dec 2022 21:04:43 +0100 Subject: integritycheck: process journeys row by row rather than at once --- lib/Travelynx/Command/integritycheck.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Travelynx/Command/integritycheck.pm b/lib/Travelynx/Command/integritycheck.pm index 774ef6f..4cfc48d 100644 --- a/lib/Travelynx/Command/integritycheck.pm +++ b/lib/Travelynx/Command/integritycheck.pm @@ -56,8 +56,9 @@ sub run { my %notified; my $rename = $self->app->renamed_station; - $res = $self->app->pg->db->select( 'journeys', [ 'route', 'edited' ] ); - for my $j ( $res->expand->hashes->each ) { + $res + = $self->app->pg->db->select( 'journeys', [ 'route', 'edited' ] )->expand; + while ( my $j = $res->hash ) { if ( $j->{edited} & 0x0010 ) { next; } -- cgit v1.2.3