Add a precompilation macro in the pg pipeline test code (#1368)

This commit is contained in:
An Tao 2022-09-01 00:30:16 +08:00 committed by GitHub
parent ff1aac37de
commit de1bd805fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,7 @@ int main(int argc, char **argv)
std::promise<void> p1;
std::future<void> f1 = p1.get_future();
app().setThreadNum(1);
#if LIBPQ_SUPPORTS_BATCH_MODE
app().createDbClient( //
"postgresql", // dbType
"127.0.0.1", // host
@ -250,7 +251,7 @@ int main(int argc, char **argv)
10, // timeout
true // autobatch
);
#endif
std::thread thr([&]() {
app().getLoop()->queueInLoop([&]() { p1.set_value(); });
app().run();