Ostorlab / oxo

OXO is a security scanning orchestrator for the modern age.
https://oxo.ostorlab.co
Apache License 2.0
513 stars 52 forks source link

Set check_same_thread to false. #688

Closed elyousfi5 closed 3 months ago

elyousfi5 commented 3 months ago

This PR fixes the following error:

ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 124220790916672 and this is thread id 124220869264000.

check_same_thread set to True: Ensures SQLite connections are thread-safe, restricting usage to the thread that created them. check_same_thread set to False: Allows SQLite connections to be shared across threads.

elyousfi5 commented 3 months ago

Does the error happen when you try to kill the server with ctrl + c or in which case?

Nope, as @mohsinenar said, its not the only case.