We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simply add a readonly arg to jsonDB to not try to lock.
readonly
For example the ls url just need to read. No need to lock the db for that. https://github.com/guits/pastefile/blob/master/pastefile/app.py#L207
ls
We also don't want to return a return "Lock timed out" in that case. Only read only database is enough.
return "Lock timed out"
The text was updated successfully, but these errors were encountered:
It will reduce the risk of having concurrent lock
Sorry, something went wrong.
Checking the code, in fact if we don't want to lock and use the jsonDB as a read only, just don't use the with statement.
jsonDB
with
db = jsonDB() db.load()
Will return the db without lock. Just take care to not save but for feature like ls it's enough
TODO rewrite part off controller.py to not lock the db.
controller.py
a266319
No branches or pull requests
Simply add a
readonly
arg to jsonDB to not try to lock.For example the
ls
url just need to read. No need to lock the db for that. https://github.com/guits/pastefile/blob/master/pastefile/app.py#L207We also don't want to return a
return "Lock timed out"
in that case. Only read only database is enough.The text was updated successfully, but these errors were encountered: