1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-09-03 05:44:19 +00:00

Add connection pool for db.

This commit is contained in:
Jiaqiang Xu
2016-08-20 15:12:17 +08:00
parent 9e422626fd
commit 48c3f5edef
11 changed files with 146 additions and 30 deletions

View File

@@ -216,7 +216,8 @@ static int init_pgsql_database (CcnetSession *session)
unix_socket = ccnet_key_file_get_string (session->keyf,
"Database", "UNIX_SOCKET");
session->db = ccnet_db_new_pgsql (host, user, passwd, db, unix_socket);
session->db = ccnet_db_new_pgsql (host, user, passwd, db, unix_socket,
DEFAULT_MAX_CONNECTIONS);
if (!session->db) {
g_warning ("Failed to open database.\n");
return -1;