mirror of
https://github.com/drogonframework/drogon.git
synced 2025-07-17 00:00:35 -04:00
Compare commits
4 Commits
9b2716ec24
...
3fa480dd87
Author | SHA1 | Date | |
---|---|---|---|
|
3fa480dd87 | ||
|
56f620717e | ||
|
ad99cf724d | ||
|
a91014a982 |
1
.github/workflows/cmake.yml
vendored
1
.github/workflows/cmake.yml
vendored
@ -175,7 +175,6 @@ jobs:
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-services
|
||||
git reset --hard 5f2fe01
|
||||
cd ~
|
||||
brew tap homebrew/services
|
||||
brew services restart postgresql
|
||||
|
@ -1 +0,0 @@
|
||||
theme: jekyll-theme-cayman
|
@ -41,37 +41,10 @@ void doAdvicesChain(
|
||||
callbackPtr,
|
||||
&advices,
|
||||
missCallback = std::move(missCallback)]() mutable {
|
||||
doAdvicesChain(advices,
|
||||
index + 1,
|
||||
req,
|
||||
callbackPtr,
|
||||
std::move(missCallback));
|
||||
});
|
||||
}
|
||||
else
|
||||
auto ioLoop = req->getLoop();
|
||||
if (ioLoop && !ioLoop->isInLoopThread())
|
||||
{
|
||||
missCallback();
|
||||
}
|
||||
}
|
||||
|
||||
void doAdvicesChain(
|
||||
const std::deque<std::function<void(const HttpRequestPtr &,
|
||||
AdviceCallback &&,
|
||||
AdviceChainCallback &&)>> &advices,
|
||||
size_t index,
|
||||
const HttpRequestImplPtr &req,
|
||||
const std::shared_ptr<const std::function<void(const HttpResponsePtr &)>>
|
||||
&callbackPtr,
|
||||
std::function<void()> &&missCallback)
|
||||
{
|
||||
if (index < advices.size())
|
||||
{
|
||||
auto &advice = advices[index];
|
||||
advice(
|
||||
req,
|
||||
[callbackPtr](const HttpResponsePtr &resp) {
|
||||
(*callbackPtr)(resp);
|
||||
},
|
||||
ioLoop->queueInLoop(
|
||||
[index,
|
||||
req,
|
||||
callbackPtr,
|
||||
@ -83,6 +56,17 @@ void doAdvicesChain(
|
||||
callbackPtr,
|
||||
std::move(missCallback));
|
||||
});
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
doAdvicesChain(advices,
|
||||
index + 1,
|
||||
req,
|
||||
callbackPtr,
|
||||
std::move(missCallback));
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -47,6 +47,15 @@ static void doFilterChains(
|
||||
callbackPtr,
|
||||
&filters,
|
||||
missCallback = std::move(missCallback)]() mutable {
|
||||
auto ioLoop = req->getLoop();
|
||||
if (ioLoop && !ioLoop->isInLoopThread())
|
||||
{
|
||||
ioLoop->queueInLoop([index,
|
||||
req,
|
||||
callbackPtr,
|
||||
&filters,
|
||||
missCallback = std::move(missCallback),
|
||||
ioLoop]() mutable {
|
||||
doFilterChains(filters,
|
||||
index + 1,
|
||||
req,
|
||||
@ -55,6 +64,16 @@ static void doFilterChains(
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
doFilterChains(filters,
|
||||
index + 1,
|
||||
req,
|
||||
callbackPtr,
|
||||
std::move(missCallback));
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
missCallback();
|
||||
}
|
||||
|
16
test.sh
16
test.sh
@ -4,7 +4,7 @@ echo "First arg:"
|
||||
echo $1
|
||||
|
||||
os='linux'
|
||||
if [ "$1" = "-w" ]; then
|
||||
if [ "X$1" = "X-w" ]; then
|
||||
os='windows'
|
||||
fi
|
||||
|
||||
@ -12,7 +12,7 @@ src_dir=$(pwd)
|
||||
|
||||
echo "OS:" $os
|
||||
|
||||
if [ $os = "linux" ]; then
|
||||
if [ "X$os" = "Xlinux" ]; then
|
||||
drogon_ctl_exec=$(pwd)/build/drogon_ctl/drogon_ctl
|
||||
else
|
||||
drogon_ctl_exec=$(pwd)/build/drogon_ctl/Debug/drogon_ctl.exe
|
||||
@ -21,7 +21,7 @@ fi
|
||||
echo ${drogon_ctl_exec}
|
||||
cd build/lib/tests/
|
||||
|
||||
if [ $os = "windows" ]; then
|
||||
if [ "X$os" = "Xwindows" ]; then
|
||||
cd Debug
|
||||
fi
|
||||
|
||||
@ -42,7 +42,7 @@ case $(nproc) in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $os = "linux" ]; then
|
||||
if [ "X$os" = "Xlinux" ]; then
|
||||
if [ -f /bin/ninja ]; then
|
||||
cmake_gen='-G Ninja'
|
||||
else
|
||||
@ -51,7 +51,7 @@ if [ $os = "linux" ]; then
|
||||
fi
|
||||
|
||||
#Make integration_test_server run as a daemon
|
||||
if [ $os = "linux" ]; then
|
||||
if [ "X$os" = "Xlinux" ]; then
|
||||
sed -i -e "s/\"run_as_daemon.*$/\"run_as_daemon\": true\,/" config.example.json
|
||||
fi
|
||||
sed -i -e "s/\"relaunch_on_error.*$/\"relaunch_on_error\": true\,/" config.example.json
|
||||
@ -131,7 +131,7 @@ cd ../views
|
||||
echo "Hello, world!" >>hello.csp
|
||||
|
||||
cd ../build
|
||||
if [ $os = "windows" ]; then
|
||||
if [ "X$os" = "Xwindows" ]; then
|
||||
cmake_gen="$cmake_gen -DCMAKE_TOOLCHAIN_FILE=$src_dir/conan_toolchain.cmake \
|
||||
-DCMAKE_PREFIX_PATH=$src_dir/install \
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
|
||||
@ -151,7 +151,7 @@ if [ $? -ne 0 ]; then
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ $os = "linux" ]; then
|
||||
if [ "X$os" = "Xlinux" ]; then
|
||||
if [ ! -f "drogon_test" ]; then
|
||||
echo "Failed to build drogon_test"
|
||||
exit -1
|
||||
@ -166,7 +166,7 @@ fi
|
||||
cd ../../
|
||||
rm -rf drogon_test
|
||||
|
||||
if [ "$1" = "-t" ]; then
|
||||
if [ "X$1" = "X-t" ]; then
|
||||
#unit testing
|
||||
cd ../../
|
||||
echo "Unit testing"
|
||||
|
2
trantor
2
trantor
@ -1 +1 @@
|
||||
Subproject commit 85a2a212102718fe3973b2ae183c75afdffc83a3
|
||||
Subproject commit e50b4162de48717a569ccd5c6f31c1e9a9b6374b
|
Loading…
x
Reference in New Issue
Block a user