Quellcode durchsuchen

Update lithium. (#5430)

* Update lithium.

* Lower number of sql connections.
Matthieu Garrigues vor 5 Jahren
Ursprung
Commit
59c617bdf4

+ 1 - 1
frameworks/C++/lithium/lithium-mysql.dockerfile

@@ -5,7 +5,7 @@ RUN apt install -yqq libboost-dev libmariadb-dev wget  libboost-context-dev g++-
 
 COPY ./ ./
 
-ENV COMMIT=d40cbe5aca32aa237dbce14b892e273b9d5a6908
+ENV COMMIT=c63fddba232e490e151d2446e9ea20b189b15693
 
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_mysql.hh
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh

+ 1 - 1
frameworks/C++/lithium/lithium-postgres.dockerfile

@@ -5,7 +5,7 @@ RUN apt install -yqq g++-9 libboost-dev postgresql-server-dev-all libpq-dev wget
 
 COPY ./ ./
 
-ENV COMMIT=d40cbe5aca32aa237dbce14b892e273b9d5a6908
+ENV COMMIT=c63fddba232e490e151d2446e9ea20b189b15693
 
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_pgsql.hh
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh

+ 2 - 2
frameworks/C++/lithium/lithium.cc

@@ -80,7 +80,7 @@ int main(int argc, char* argv[]) {
     response.write_json(s::message = "Hello, World!");
   };
   my_api.get("/db") = [&](http_request& request, http_response& response) {
-    set_max_sql_connections_per_thread(1024 / nprocs);
+    set_max_sql_connections_per_thread(128 / nprocs);
     response.write_json(random_numbers.connect(request.yield).find_one(s::id = 1234).value());
   };
 
@@ -144,7 +144,7 @@ int main(int argc, char* argv[]) {
   };
 
   my_api.get("/fortunes") = [&](http_request& request, http_response& response) {
-    set_max_sql_connections_per_thread(1024 / nprocs);
+    set_max_sql_connections_per_thread(128 / nprocs);
 
     typedef decltype(fortunes.all_fields()) fortune;
     std::vector<fortune> table;