Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- connectionWorker :: AppState -> IO ()
- reReadConfig :: Bool -> AppState -> IO ()
- listener :: AppState -> IO ()
Documentation
connectionWorker :: AppState -> IO () Source #
The purpose of this worker is to obtain a healthy connection to pg and an up-to-date schema cache(DbStructure). This method is meant to be called multiple times by the same thread, but does nothing if the previous invocation has not terminated. In all cases this method does not halt the calling thread, the work is preformed in a separate thread.
Background thread that does the following : 1. Tries to connect to pg server and will keep trying until success. 2. Checks if the pg version is supported and if it's not it kills the main program. 3. Obtains the dbStructure. If this fails, it goes back to 1.