Execute redis pipeline every 1000th iteration.