Created
September 13, 2021 18:15
-
-
Save rogerbinns/b9dcc4d5d5d66f97c21a990e2567b494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import apsw | |
class Example: | |
def connect(self): | |
while True: | |
dbname = "example.db" | |
connection = apsw.Connection(str(dbname)) | |
connection.cursor().execute("PRAGMA journal_mode = WAL") | |
connection.setbusyhandler(self.busyHandler) | |
print(".", end="", flush=True) | |
def busyHandler(self, n): | |
print("callled") | |
return True | |
ex = Example() | |
ex.connect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment