Add a flag to unlock database after each API request

After the first API request, the database was locked as long as the API
server is running. This prevents a user to also use the command-line
client. This commit adds a new flag `-no-lock` that will close the
database after each API request.

Closes #234
This commit is contained in:
Vincent Bernat
2015-09-07 13:44:01 +02:00
parent 16101b56fe
commit 7f6a52019f
4 changed files with 87 additions and 5 deletions
+1
View File
@@ -46,6 +46,7 @@ Example:
}
cmd.Flag.String("listen", ":8080", "host:port for HTTP listening")
cmd.Flag.Bool("no-lock", false, "don't lock the database")
return cmd