LP#
1718301 Offline db connections via promise
Refactors offline DB connection call to return a promise, resolved upon
successful connection, instead of polling for a successful connection
within the connect call.
Multiple calls to the main egLoveField connect function will result in
resolvers being linked to the same in-progress promise.
Check for connection errors via the database.connect() reject handler.
Avoid attempts to connect to the offline DB until egLoveField.connectOrGo()
is called the first time.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>