ソースを参照

cutelyst: Update to v3.1 and Cutelee v6 (#6752)

Daniel Nicoletti 4 年 前
コミット
d80401e61b

+ 4 - 4
frameworks/C++/cutelyst/build.sh

@@ -1,8 +1,8 @@
 #!/bin/bash
 
 export ASQL_VER=0.43.0
-export CUTELEE_VER=5.3.0
-export CUTELYST_VER=2.14.0
+export CUTELEE_VER=6.0.0
+export CUTELYST_VER=3.1.0
 
 apt update -qq && \
     apt install -yqq --no-install-recommends \
@@ -14,8 +14,8 @@ apt update -qq && \
     qtdeclarative5-dev \
     postgresql-server-dev-all
 
-wget -q https://github.com/cutelyst/cutelee/releases/download/v${CUTELEE_VER}/cutelee5_${CUTELEE_VER}_amd64.deb && \
-    apt install -yqq ./cutelee5_${CUTELEE_VER}_amd64.deb
+wget -q https://github.com/cutelyst/cutelee/releases/download/v${CUTELEE_VER}/cutelee_${CUTELEE_VER}_amd64.deb && \
+    apt install -yqq ./cutelee_${CUTELEE_VER}_amd64.deb
 
 wget -q https://github.com/cutelyst/asql/releases/download/v${ASQL_VER}/libasql_${ASQL_VER}_amd64.deb && \
     apt install -yqq ./libasql_${ASQL_VER}_amd64.deb

+ 1 - 1
frameworks/C++/cutelyst/cutelyst-thread-pico.dockerfile

@@ -29,7 +29,7 @@ ENV CPU_AFFINITY 1
 
 EXPOSE 8080
 
-CMD cutelyst-wsgi2 \
+CMD ${TROOT}/build/cutelyst-benchmarks \
     --ini /cutelyst.ini:uwsgi \
     --application ${CUTELYST_APP} \
     --processes=${C_PROCESSES} \

+ 3 - 3
frameworks/C++/cutelyst/src/CMakeLists.txt

@@ -6,8 +6,8 @@ cmake_policy(SET CMP0069 NEW)
 
 find_package(Qt5 5.6.0 REQUIRED COMPONENTS Core Network Sql)
 find_package(ASqlQt5 0.43.0 REQUIRED)
-find_package(Cutelyst2Qt5 2.12 REQUIRED)
-find_package(Cutelee5 REQUIRED)
+find_package(Cutelyst3Qt5 3.1 REQUIRED)
+find_package(Cutelee6Qt5 6.0.0 REQUIRED)
 find_package(PostgreSQL REQUIRED)
 find_package(mimalloc 1.0)
 
@@ -62,7 +62,7 @@ add_executable(cutelyst-benchmarks ${cutelyst_benchmarks_SRCS} main.cpp)
 target_link_libraries(cutelyst-benchmarks
     PUBLIC
     Cutelyst::Core
-    Cutelyst::WSGI
+    Cutelyst::Server
     Cutelyst::Utils::Sql
     Cutelyst::View::Cutelee
     Qt5::Core

+ 5 - 4
frameworks/C++/cutelyst/src/main.cpp

@@ -1,17 +1,18 @@
+
 #include "cutelyst-benchmarks.h"
 
 #include <QCoreApplication>
 
-#include <Cutelyst/WSGI/wsgi.h>
+#include <Cutelyst/Server/server.h>
 
 int main(int argc, char *argv[])
 {
     QCoreApplication app(argc, argv);
 
-    CWSGI::WSGI wsgi;
-    wsgi.parseCommandLine(app.arguments());
+    Cutelyst::Server server;
+    server.parseCommandLine(app.arguments());
 
     auto bench = new cutelyst_benchmarks;
 
-    return wsgi.exec(bench);
+    return server.exec(bench);
 }

+ 1 - 1
frameworks/C++/cutelyst/src/multipledatabasequeriestest.cpp

@@ -26,7 +26,7 @@ void MultipleDatabaseQueriesTest::queriesp(Context *c)
         queries = 500;
     }
 
-    auto array = QSharedPointer<QJsonArray>(new QJsonArray);
+    auto array = std::shared_ptr<QJsonArray>(new QJsonArray);
     ASync async(c);
     static thread_local auto db = APool::database();
     for (int i = 0; i < queries; ++i) {