gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-donau] branch master updated: added missing dbinit logic


From: gnunet
Subject: [taler-donau] branch master updated: added missing dbinit logic
Date: Tue, 09 Jan 2024 10:55:09 +0100

This is an automated email from the git hooks/post-receive script.

johannes-casaburi pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 0c5f4e9  added missing dbinit logic
0c5f4e9 is described below

commit 0c5f4e9a60b6c35253b8a0c8b40f692a95628631
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
AuthorDate: Tue Jan 9 10:54:32 2024 +0100

    added missing dbinit logic
---
 src/donau/donau-httpd.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c
index c3b7320..9877857 100644
--- a/src/donau/donau-httpd.c
+++ b/src/donau/donau-httpd.c
@@ -759,6 +759,23 @@ donau_serve_process_config (void)
     return GNUNET_SYSERR;
   }
 
+  for (unsigned int i = 0; i<MAX_DB_RETRIES; i++)
+  {
+    DH_plugin = DONAUDB_plugin_load (DH_cfg);
+    if (NULL != DH_plugin)
+      break;
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Failed to connect to DB, will try again %u times\n",
+                MAX_DB_RETRIES - i);
+    sleep (1);
+  }
+  if (NULL == DH_plugin)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to initialize DB subsystem. Giving up.\n");
+    return GNUNET_SYSERR;
+  }
+
   return GNUNET_OK;
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]