Command line args to make local running easier #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It can be tricky to use routemaster locally without hacking the config because:
This change adds command line options & associated config to workaround these issues and make running locally possible without hacking config in these ways, specifically:
--local
which looks for a newly addedlocalport
setting in the webhooks config items--local
is set and the webhook called matches a given webhook config that has alocalport
setting, the URL is overridden to use HTTP scheme and a netloc of'localhost:{0}'.format(x)
where x is the value oflocalport
in the config--python-logging-only
which skips instantiation of any loggers that are not the basic routemaster PythonLogger, so the advanced loggers will not be usedThis has been tested manually. I'm not sure that the webhooks config is the ideal place for this - it seems like there may be an alternative that's higher up the config tree and a bit more specific to this case. Also, I'm open to suggestions for alternative names of these options if people don't think the names are helpful.