From 90a3c3189040118771ad1ce94760aeea92131fe3 Mon Sep 17 00:00:00 2001 From: Smertig Date: Sun, 5 May 2024 19:42:18 +0300 Subject: [PATCH] CI: fix "Too Many Requests" --- examples/examples_util.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/examples_util.hpp b/examples/examples_util.hpp index e8cf20d13..bfdb6e93f 100644 --- a/examples/examples_util.hpp +++ b/examples/examples_util.hpp @@ -1,9 +1,11 @@ #pragma once +#include #include #include -#include +#include #include +#include inline std::tuple parse_input_or_fail(int argc, const char** argv) { auto token = argc > 1 ? argv[1] : std::getenv("BANANA_BOT_TOKEN"); @@ -31,5 +33,8 @@ inline std::tuple parse_inpu } message_text += "!"; + // Hack to make sure each example has 1 second delay before calling telegram API + std::this_thread::sleep_for(std::chrono::seconds(1)); + return { token, target, std::move(example_name), std::move(message_text) }; }