File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7979 with :
8080 fetch-depth : 0
8181 - name : Install dependencies
82- run : sudo apt install -y libssl-dev libpq-dev
82+ run : sudo apt install -y libssl-dev libpq-dev libcurl4-openssl-dev
8383 # Ubuntu's apt Boost (1.83 on 24.04) predates Boost.Redis, which was added
8484 # in Boost 1.84, so <boost/redis.hpp> is absent. Install a newer Boost.
8585 # Boost.Redis/Asio are header-only, so we only need the headers plus the
Original file line number Diff line number Diff line change @@ -49,12 +49,17 @@ int RedisRunner::run(const std::string& questdbHost,
4949 const std::string& redisHost,
5050 int redisPort,
5151 const std::string& queueKey) {
52+
53+ // Event loop that drives all async Redis I/O on this thread.
5254 asio::io_context ioc;
5355 auto conn = redis_util::makeRedisConnection (ioc, redisHost, redisPort);
5456
57+ // Outputs of the coroutine — filled in by the completion handler below.
5558 std::optional<std::string> popped;
5659 std::exception_ptr popError;
5760
61+ // Schedule popOnce() onto the io_context. When the coroutine finishes,
62+ // the lambda is invoked with either an exception or the popped value.
5863 asio::co_spawn (
5964 ioc,
6065 popOnce (conn, queueKey),
@@ -67,6 +72,7 @@ int RedisRunner::run(const std::string& questdbHost,
6772 popped = std::move (r);
6873 });
6974
75+ // Block until the coroutine (and the Redis connection loop) finish.
7076 ioc.run ();
7177
7278 if (popError) {
You can’t perform that action at this time.
0 commit comments