I tried writing a SQLiteConnection ResourceManager as a demo, but when executing with DaskExecutor it leads to problems with having different threads:
Copy code
ProgrammingError('SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 8032 and this is thread id 2308.')
Is there a way to work around this other than using a LocalExecutor? e.g. a parameter for the ResourceManager to tell it to keep everything that uses it in the same thread?
d
Dylan
04/09/2021, 4:25 PM
Hey Klaus, taking a look 👍
Dylan
04/09/2021, 5:41 PM
Hey @xyzy I don’t think it’s possible to specify that because any executor that utilizes parallelism allows these kinds of constraints generally
Dylan
04/09/2021, 5:42 PM
It’s possible that object just isn’t thread-safe and switching to processes in your Dask Executor would fix the issue?
Dylan
04/09/2021, 5:42 PM
Further, make sure that the objects produced by your ResourceManager are serializable
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.