Loading lib/Travelynx/Command/maintenance.pm +8 −7 Original line number Diff line number Diff line Loading @@ -79,11 +79,12 @@ sub run { say "Deleting uid ${uid}..."; my $tokens_res = $db->delete( 'tokens', { user_id => $uid } ); my $stats_res = $db->delete( 'journey_stats', { user_id => $uid } ); my $actions_res = $db->delete( 'user_actions', { user_id => $uid } ); my $journeys_res = $db->delete( 'journeys', { user_id => $uid } ); my $transit_res = $db->delete( 'in_transit', { user_id => $uid } ); my $user_res = $db->delete( 'users', { id => $uid } ); printf( " %d tokens, %d monthly stats, %d actions\n", $tokens_res->rows, $stats_res->rows, $actions_res->rows ); printf( " %d tokens, %d monthly stats, %d journeys\n", $tokens_res->rows, $stats_res->rows, $journeys_res->rows ); if ( $user_res->rows != 1 ) { printf STDERR ( Loading lib/Travelynx/Command/munin.pm +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ sub run { my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_window_query = qq{select count(*) as count from user_actions where action_id = 1 and action_time > to_timestamp(?);}; = qq{select count(*) as count from journeys where checkin_time > to_timestamp(?);}; query_to_munin( 'reg_user_count', $db->select( 'users', 'count(*) as count', { status => 1 } ) Loading Loading
lib/Travelynx/Command/maintenance.pm +8 −7 Original line number Diff line number Diff line Loading @@ -79,11 +79,12 @@ sub run { say "Deleting uid ${uid}..."; my $tokens_res = $db->delete( 'tokens', { user_id => $uid } ); my $stats_res = $db->delete( 'journey_stats', { user_id => $uid } ); my $actions_res = $db->delete( 'user_actions', { user_id => $uid } ); my $journeys_res = $db->delete( 'journeys', { user_id => $uid } ); my $transit_res = $db->delete( 'in_transit', { user_id => $uid } ); my $user_res = $db->delete( 'users', { id => $uid } ); printf( " %d tokens, %d monthly stats, %d actions\n", $tokens_res->rows, $stats_res->rows, $actions_res->rows ); printf( " %d tokens, %d monthly stats, %d journeys\n", $tokens_res->rows, $stats_res->rows, $journeys_res->rows ); if ( $user_res->rows != 1 ) { printf STDERR ( Loading
lib/Travelynx/Command/munin.pm +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ sub run { my $now = DateTime->now( time_zone => 'Europe/Berlin' ); my $checkin_window_query = qq{select count(*) as count from user_actions where action_id = 1 and action_time > to_timestamp(?);}; = qq{select count(*) as count from journeys where checkin_time > to_timestamp(?);}; query_to_munin( 'reg_user_count', $db->select( 'users', 'count(*) as count', { status => 1 } ) Loading