Skip to content

Commit ccacd4e

Browse files
committed
UPD | some improvements
1 parent 700a2b2 commit ccacd4e

File tree

123 files changed

+3370
-2519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3370
-2519
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,8 @@ set(MANAPIHTTP_HTTP_FILES
694694
include/ext/pq/AsyncPostgreValue.hpp
695695
include/ext/pq/AsyncPostgreValueTypes.hpp
696696
include/ext/pq/AsyncPostgreNotification.hpp
697+
include/ext/pq/AsyncPostgrePool.hpp
698+
include/ext/pq/AsyncPostgreImpl.ipp
697699
include/std/ManapiAsyncParallelRun.hpp
698700
include/ManapiFetch2.hpp
699701
include/ManapiTimerObject.hpp
@@ -916,7 +918,7 @@ if (MANAPIHTTP_BUILD_TYPE STREQUAL "exe" OR MANAPIHTTP_BUILD_TYPE STREQUAL "test
916918
endif ()
917919

918920
target_compile_definitions(${PROJECT_NAME} PRIVATE MANAPIHTTP_HTTP_AS_EXECUTABLE)
919-
target_sources(${PROJECT_NAME} PRIVATE main.cpp handlers.hpp handlers.cpp ${MANAPIHTTP_HTTP_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
921+
target_sources(${PROJECT_NAME} PRIVATE main.cpp impl.cpp handlers.hpp handlers.cpp ${MANAPIHTTP_HTTP_FILES} ${PROTO_SRCS} ${PROTO_HDRS})
920922

921923
# target_sources(${PROJECT_NAME} PUBLIC
922924
# FILE_SET CXX_MODULES

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ public:
297297

298298
// Assembles the client's payload, sends it and presents the response back
299299
// from the server.
300-
manapi::future<manapi::error::status_or<std::string>> SayHello(const std::string& user) {
301-
using promise = manapi::async::promise_sync<manapi::error::status_or<std::string>>;
300+
manapi::future<manapi::status_or<std::string>> SayHello(const std::string& user) {
301+
using promise = manapi::async::promise_sync<manapi::status_or<std::string>>;
302302
// Data we are sending to the server.
303303
helloworld::HelloRequest request;
304304
request.set_name(user);
@@ -321,7 +321,7 @@ public:
321321

322322
auto msg = status.error_message();
323323
manapi_log_debug("grpc client failed due to %s", msg.data());
324-
resolve(manapi::error::status_internal("grpc client: something gets wrong"));
324+
resolve(manapi::status_internal("grpc client: something gets wrong"));
325325
}
326326
else {
327327
ctx->event_loop()->custom_callback([resolve = std::move(resolve), &reply, status = std::move(status)] (manapi::event_loop *ev) -> void {
@@ -332,14 +332,14 @@ public:
332332

333333
auto msg = status.error_message();
334334
manapi_log_debug("grpc client failed due to %s", msg.data());
335-
resolve(manapi::error::status_internal("grpc client: something gets wrong"));
335+
resolve(manapi::status_internal("grpc client: something gets wrong"));
336336
}).unwrap();
337337
}
338338
});
339339
}
340340
catch (std::exception const &e) {
341341
manapi_log_error(e.what());
342-
resolve(manapi::error::status_internal("sayhello failed"));
342+
resolve(manapi::status_internal("sayhello failed"));
343343
}
344344
});
345345
}
@@ -377,9 +377,9 @@ int main () {
377377
res.log();
378378
res.unwrap();
379379

380-
res = co_await grpc_server.start([&] (grpc::ServerBuilder &builder) -> manapi::error::status {
380+
res = co_await grpc_server.start([&] (grpc::ServerBuilder &builder) -> manapi::status {
381381
builder.RegisterService(service.get());
382-
return manapi::error::status_ok();
382+
return manapi::status_ok();
383383
});
384384
385385
res.log();

impl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
#include "ext/pq/AsyncPostgreImpl.ipp"

0 commit comments

Comments
 (0)