Allow lazily connecting to the database
commit3e3db59f9689187af2ce160e5d1945ec6db75a63
authorAndreas Ericsson <ae@op5.se>
Mon, 5 Jul 2010 09:46:33 +0000 (5 11:46 +0200)
committerAndreas Ericsson <ae@op5.se>
Mon, 5 Jul 2010 09:46:33 +0000 (5 11:46 +0200)
tree1786274b74898c9e3b0ccabb4962f5732a85acd9
parentd4ee9beef712d4d966de0f10f5f366722fa7da3e
Allow lazily connecting to the database

We really need a backlog for this sort of thing, but the module
shouldn't fail to initialize if the database happens to be
offline while it loads up, since it sometimes takes a little
while for the database engine to start properly.

This makes sure the module attempts to reconnect to the database
in case the connection dies. When we merge the reports-module
with merlin, this problem will largely go away as merlin already
handles these cases properly.

Signed-off-by: Andreas Ericsson <ae@op5.se>
module.c
sql.c