From 2a66beb6db3a61216c6439d44dae4af98dce21b5 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Wed, 17 Jan 2024 17:04:42 -0500 Subject: [PATCH] changes for reopen task and retry cooldown --- include/actsim_agent/downloader.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/actsim_agent/downloader.hpp b/include/actsim_agent/downloader.hpp index 24fcb61..b2c2084 100644 --- a/include/actsim_agent/downloader.hpp +++ b/include/actsim_agent/downloader.hpp @@ -31,6 +31,8 @@ #include #include "task_interface.hpp" +#define NOTHING_AVAILABLE_SLEEP_TIME 500ms + class Downloader { public: @@ -45,7 +47,7 @@ class Downloader { void thread_run(); bool fetch_tasks(size_t n); bool fetch_design(const db::uuid_t& id, std::string& design); - void reopen_task(const db::uuid_t& id); + void reopen_task(const db::uuid_t& id, bool halt); std::unique_ptr downloader_thread; std::unique_ptr conn;