diff --git a/client.pyw b/client.pyw index 4cc0968c..83d2e624 100755 --- a/client.pyw +++ b/client.pyw @@ -29,11 +29,15 @@ try: from include import HydrusLogger import traceback + # + import argparse argparser = argparse.ArgumentParser( description = 'hydrus network client (windowed)' ) argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) + argparser.add_argument( '--no_daemons', action='store_true', help = 'run without background daemons' ) + argparser.add_argument( '--no_wal', action='store_true', help = 'run without WAL db journalling' ) result = argparser.parse_args() @@ -46,6 +50,8 @@ try: db_dir = result.db_dir + db_dir = HydrusPaths.ConvertPortablePathToAbsPath( db_dir ) + try: HydrusPaths.MakeSureDirectoryExists( db_dir ) @@ -55,6 +61,11 @@ try: raise Exception( 'Could not ensure db path ' + db_dir + ' exists! Check the location is correct and that you have permission to write to it!' ) + no_daemons = result.no_daemons + no_wal = result.no_wal + + # + log_path = os.path.join( db_dir, 'client.log' ) with HydrusLogger.HydrusLogger( log_path ) as logger: @@ -65,7 +76,7 @@ try: threading.Thread( target = reactor.run, kwargs = { 'installSignalHandlers' : 0 } ).start() - controller = ClientController.Controller( db_dir ) + controller = ClientController.Controller( db_dir, no_daemons, no_wal ) controller.Run() diff --git a/db/to permanently disable wal.txt b/db/to permanently disable wal.txt index 7e184f18..ecbdb198 100644 --- a/db/to permanently disable wal.txt +++ b/db/to permanently disable wal.txt @@ -1,3 +1,3 @@ -If you do not want to use WAL journalling, you can either use the switch '-no-wal' on either the client or server, or you can just put a file in this directory called 'no-wal'. SQLite will try to use TRUNCATE instead. +If you do not want to use WAL journalling, you can either use the switch '--no_wal' on either the client or server, or you can just put a file in this directory called 'no-wal'. SQLite will try to use TRUNCATE instead. This can happen automatically if WAL fails on db creation. \ No newline at end of file diff --git a/help/changelog.html b/help/changelog.html index cac4a702..a1025d78 100755 --- a/help/changelog.html +++ b/help/changelog.html @@ -8,6 +8,21 @@

changelog