You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've asked this question over on elixirforum but I thought I might check here as well. I'm just curious what the correct pattern for handling Mariaex processes is for a long-running application, not using Ecto.
Should I start up the Mariaex process (via Mariaex.start_link/1) and then hold on to that pid, using it for all subsequent queries? Or should I stop that process as soon as I'm done with a particular query, and spin up a new process when I need to make another query later on? I know under the covers using DBConnection all the connection pooling stuff should be handled for me, but I tried to dig through Ecto's codebase to see how it was done there and came up more confused than I was when I started.
The text was updated successfully, but these errors were encountered:
I've asked this question over on elixirforum but I thought I might check here as well. I'm just curious what the correct pattern for handling Mariaex processes is for a long-running application, not using Ecto.
Should I start up the Mariaex process (via
Mariaex.start_link/1
) and then hold on to that pid, using it for all subsequent queries? Or should I stop that process as soon as I'm done with a particular query, and spin up a new process when I need to make another query later on? I know under the covers usingDBConnection
all the connection pooling stuff should be handled for me, but I tried to dig through Ecto's codebase to see how it was done there and came up more confused than I was when I started.The text was updated successfully, but these errors were encountered: