Unverified Commit 8b62a94e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

stats: no need for transactions here

parent d5bdc47e
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -26,13 +26,12 @@ sub refresh_all {
	for
	  my $user ( $db->select( 'users', ['id'], { status => 1 } )->hashes->each )
	{
		my $tx = $db->begin;
		$self->app->journeys->generate_missing_stats( uid => $user->{id} );
		$self->app->journeys->get_stats(
			uid        => $user->{id},
			year => $now->year
			year       => $now->year,
			write_only => 1,
		);
		$tx->commit;
		if ( $i == $total or ( $i % 10 ) == 0 ) {
			printf( "%.f%% complete", $i * 100 / $total );
		}