summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/integritycheck.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-04 21:04:43 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-04 21:04:43 +0100
commite2b756f06e48c3d337b04085cd4ae23cbc09f3d6 (patch)
tree9952255d784fe0edef8f9c963d10bdcd76b3b7f7 /lib/Travelynx/Command/integritycheck.pm
parent37cb85e60df74ff54546a4b012b0f587a93abac0 (diff)
integritycheck: process journeys row by row rather than at once
Diffstat (limited to 'lib/Travelynx/Command/integritycheck.pm')
-rw-r--r--lib/Travelynx/Command/integritycheck.pm5
1 files 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;
}