Skip to content
New issue

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

Add an option to allow WAL mode for sqlite connections #34

Open
ricardo-elevenpaths opened this issue Sep 17, 2019 · 1 comment
Open

Comments

@ricardo-elevenpaths
Copy link

Hello,

I'm looking into the possibility to share database data/missions among other team members, since jok3r is using sqlite there is not too much we can do, for that reason I am trying to share local.db using a docker volume within a bucket in Google Cloud Storage (https://www.youtube.com/watch?v=4Z4mQqQ92tc), theorically, sharing a volume with the db location of one jok3r instance, and enabling WAL mode for the sqlite connections, it should allow to work with multiples jok3r container instances pointing to the same db.

I am not an expert programming in python but as far as I know the way it can be done either:

pragmas = [ ('journal_mode', 'wal'), ('cache_size', -1000 * 32)] db = SqliteExtDatabase('blog.db', pragmas=pragmas)

OR
db:sqlite:foo.db?foreign_keys=ON;journal_mode=WAL

OR
conn.execute('pragma journal_mode=wal')

I didn't find any place where to set and test it, has anyone try it before?

@koutto
Copy link
Owner

koutto commented Dec 19, 2019

Sorry for the delayed reply. I am currently working on a lot of improvment. Among them, sqlite will be replaced by postgresql with a dedicated container for the database. Stay tuned !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants