Merge lp://staging/~lucio.torre/txstatsd/add-config-file into lp://staging/txstatsd
Proposed by
Lucio Torre
Status: | Merged |
---|---|
Approved by: | Sidnei da Silva |
Approved revision: | 13 |
Merge reported by: | Lucio Torre |
Merged at revision: | not available |
Proposed branch: | lp://staging/~lucio.torre/txstatsd/add-config-file |
Merge into: | lp://staging/txstatsd |
Diff against target: |
374 lines (+261/-15) 9 files modified
MANIFEST.in (+2/-2) setup.py (+16/-1) statsd.tac (+5/-9) twisted/plugins/txstatsd_plugin.py (+22/-0) txstatsd.conf-example (+6/-0) txstatsd/metrics.py (+1/-1) txstatsd/processor.py (+3/-2) txstatsd/service.py (+103/-0) txstatsd/tests/test_service.py (+103/-0) |
To merge this branch: | bzr merge lp://staging/~lucio.torre/txstatsd/add-config-file |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sidnei da Silva | Approve | ||
Review via email:
|
Commit message
add config file support
Description of the change
Adds config file support to txstatsd.
Now you can configure txstatsd using command line arguments and/or a config file when running as a twistd plugin.
After installing, you can now do:
$ twistd txstatsd
And it will start txstatsd with the default parameters.
If --config/-c FILE is specified, it will read the config from that file. All the arguments can also be specified from the command line and will take precedence over the ones in the config file.
To post a comment you must log in.
Looks great, with some whitespace cleanup and naming consistency
issues fixed. +1.
[1] pep8 isn't supper happy. :)
=== pep8 ===
txstatsd/ tests/test_ service. py:15:1: W293 blank line contains whitespace tests/test_ service. py:19:1: W293 blank line contains whitespace tests/test_ service. py:26:1: W293 blank line contains whitespace tests/test_ service. py:30:1: W293 blank line contains whitespace tests/test_ service. py:37:1: W293 blank line contains whitespace tests/test_ service. py:38:1: W293 blank line contains whitespace tests/test_ service. py:39:9: E303 too many blank lines (2) tests/test_ service. py:40:1: W293 blank line contains whitespace tests/test_ service. py:41:1: W293 blank line contains whitespace tests/test_ service. py:42:5: E303 too many blank lines (2) tests/test_ service. py:47:55: E202 whitespace before ']' tests/test_ service. py:49:1: W293 blank line contains whitespace tests/test_ service. py:59:1: W293 blank line contains whitespace tests/test_ service. py:63:1: W293 blank line contains whitespace tests/test_ service. py:71:1: W293 blank line contains whitespace tests/test_ service. py:79:1: W293 blank line contains whitespace tests/test_ service. py:85:1: W293 blank line contains whitespace tests/test_ service. py:90:1: W293 blank line contains whitespace tests/test_ service. py:91:1: W293 blank line contains whitespace tests/test_ service. py:96:61: W292 no newline at end of file plugins/ txstatsd_ plugin. py:22:38: W292 no newline at end of file service. py:12:1: E302 expected 2 blank lines, found 1 service. py:16:1: W293 blank line contains whitespace service. py:18:1: W293 blank line contains whitespace service. py:24:1: W293 blank line contains whitespace service. py:30:1: W293 blank line contains whitespace service. py:36:1: W293 blank line contains whitespace service. py:38:1: W293 blank line contains whitespace service. py:43:1: W293 blank line contains whitespace service. py:48:1: W293 blank line contains whitespace service. py:58:1: W293 blank line contains whitespace service. py:60:1: W293 blank line contains whitespace service. py:61:1: W293 blank line contains whitespace service. py:76:1: W293 blank line contains whitespace service. py:77:1: W293 blank line contains whitespace service. py:80:1: W293 blank line contains whitespace service. py:94:1: W293 blank line contains whitespace service. py:95:19: W292 no newline at end of file
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
twisted/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
txstatsd/
setup.py:30:1: E302 expected 2 blank lines, found 1
[2] some warnings from pyflakes but you can ignore those.
=== pyflakes ===
setup.py:11: 'setuptools' imported but unused
setup.py:14: redefinition of unused 'find_packages' from line 12
[3] is 'refresh_ plugin_ cache' needed in setup.py? A docstring
explaining why would be nice.
[4] Please use assertEqual( expected, got) instead of assertEquals(got, expected)
[5] The docstring for test_no_ config_ option is the same as
test_set_parameter, please update...