Using DataMapper, in a process that develops children, I get packet corruption due to the connection to the database still being open (and used) in the parent. I want to force disconnect and reconnect, as you should do when forking, but the DataMapper does not look like it even considered this use case.
Now I am going through a private API, and I had to deal a bit with the internal components and its connection pool so that this is not correct:
DataMapper.repository(:default).adapter.send(:open_connection).dispose
Does anyone know if there is a more “public” and correct way to do this? I asked via IRC, but no one answered.
source
share