Only connect to redis of stats_enabled

Fixes #354