[bridgedb/master] Update help text in commandline options menu for using signals.

commit 9b5c320f162be627720412f0881ffc35fb6f1bb0 Author: Isis Lovecruft <isis@torproject.org> Date: Wed Feb 5 22:07:16 2014 +0000 Update help text in commandline options menu for using signals. --- lib/bridgedb/Main.py | 3 --- lib/bridgedb/parse/options.py | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py index 363b787..4ab4d02 100644 --- a/lib/bridgedb/Main.py +++ b/lib/bridgedb/Main.py @@ -616,9 +616,6 @@ def runSubcommand(options, config): statuscode = 0 - if options['dump-bridges']: - runner.doDumpBridges(config) - if options.subCommand is not None: logging.debug("Running BridgeDB command: '%s'" % options.subCommand) diff --git a/lib/bridgedb/parse/options.py b/lib/bridgedb/parse/options.py index 323de6d..0285184 100644 --- a/lib/bridgedb/parse/options.py +++ b/lib/bridgedb/parse/options.py @@ -258,6 +258,28 @@ class MockOptions(BaseOptions): (types: netstatus, extrainfo, server)''']] +class SIGHUPOptions(BaseOptions): + """Options menu to explain usage and handling of SIGHUP signals.""" + + longdesc = """If you send a SIGHUP to a running BridgeDB process, the + servers will parse and reload all bridge descriptor files into the + databases. + + Note that this command WILL NOT handle sending the signal for you; see + signal(7) and kill(1) for additional help.""" + + +class SIGUSR1Options(BaseOptions): + """Options menu to explain usage and handling of SIGUSR1 signals.""" + + longdesc = """If you send a SIGUSR1 to a running BridgeDB process, the + servers will dump all bridge assignments by distributor from the + databases to files. + + Note that this command WILL NOT handle sending the signal for you; see + signal(7) and kill(1) for additional help.""" + + class MainOptions(BaseOptions): """Main commandline options parser for BridgeDB.""" @@ -266,4 +288,8 @@ class MainOptions(BaseOptions): ['reload', 'R', 'Reload bridge descriptors into running servers']] subCommands = [ ['test', None, TestOptions, "Run twisted.trial tests or unittests"], - ['mock', None, MockOptions, "Generate a testing environment"]] + ['mock', None, MockOptions, "Generate a testing environment"], + ['SIGHUP', None, SIGHUPOptions, + "Reload bridge descriptors into running servers"], + ['SIGUSR1', None, SIGUSR1Options, + "Dump bridges by hashring assignment into files"]]
participants (1)
-
isis@torproject.org