This function reloads the database connection.
Occasionally, you may need to reload the database connection.
<conn>Defines the database connection.
<opts>Defines additional options for the function.
This function can take one additional option.
:timeoutDefines the timeout value in milliseconds. In the event that the reload operate takes longer than the alloted time, MarcoPolo sends an exit signal to the calling process.
Consider the use case of a multithreaded application or some similar deployment in which multiple clients are operating on the given OrientDB database. You might want to set up a basic timer that reloads the database connection periodically from a separate thread.
@doc """ Reload the database connection at set intervals""" def reload(conn, interval) do # Log Operation IO.puts("Starting Reload Function") # Start Timer timer.apply_interval(interval, MarcoPolo, db_reload, conn) end