genome/nessy-server — pull request #35 by mark-burnett (2014-02-12 21:21:16+00:00)
Title: Make statsd module load lazily

The statsd module we're using right now (python-statsd) uses a global variable to manage its connection, so we need to load it late in order to avoid issues with uWSGI prefork loading the wrong configuration everywhere.

The primary alternative package (https://github.com/jsocol/pystatsd) doesn't use global state, but it didn't install cleanly in my development environment (complaining that it needed argparse >= 1.2). It's a little unclear why that would be, but for now we can just keep using python-statsd.