maintenance: show details when about to delete a large amount of UIDs
This commit is contained in:
parent
a88dea059b
commit
105fc8a4a1
1 changed files with 11 additions and 0 deletions
|
@ -126,6 +126,17 @@ sub run {
|
||||||
"About to delete %d accounts, which is quite a lot.\n",
|
"About to delete %d accounts, which is quite a lot.\n",
|
||||||
scalar @uids_to_delete
|
scalar @uids_to_delete
|
||||||
);
|
);
|
||||||
|
for my $uid (@uids_to_delete) {
|
||||||
|
my $journeys_res = $db->select(
|
||||||
|
'journeys',
|
||||||
|
'count(*) as count',
|
||||||
|
{ user_id => $uid }
|
||||||
|
)->hash;
|
||||||
|
printf STDERR (
|
||||||
|
" - UID %5d (%4d journeys)\n",
|
||||||
|
$uid, $journeys_res->{count}
|
||||||
|
);
|
||||||
|
}
|
||||||
say STDERR 'Aborting maintenance. Please investigate.';
|
say STDERR 'Aborting maintenance. Please investigate.';
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue