Add gear statsd support
Gear 0.5.0 added statsd support for the gear server. Have Zuul use it based on the existence of the same env vars Zuul uses to configure its own use of statsd. Change-Id: I09ea2541d1f2eff5f4fd2e0c78da2acfdc1776ab
This commit is contained in:
+7
-1
@@ -154,7 +154,13 @@ class Server(object):
|
||||
os.close(pipe_write)
|
||||
self.setup_logging('gearman_server', 'log_config')
|
||||
import gear
|
||||
gear.Server(4730)
|
||||
statsd_host = os.environ.get('STATSD_HOST')
|
||||
statsd_port = int(os.environ.get('STATSD_PORT', 8125))
|
||||
gear.Server(4730,
|
||||
statsd_host=statsd_host,
|
||||
statsd_port=statsd_port,
|
||||
statsd_prefix='zuul.geard')
|
||||
|
||||
# Keep running until the parent dies:
|
||||
pipe_read = os.fdopen(pipe_read)
|
||||
pipe_read.read()
|
||||
|
||||
Reference in New Issue
Block a user