changes for reopen task and retry cooldown
This commit is contained in:
parent
112aa3549a
commit
2a66beb6db
1 changed files with 3 additions and 1 deletions
|
|
@ -31,6 +31,8 @@
|
||||||
#include <cluster/db_client.hpp>
|
#include <cluster/db_client.hpp>
|
||||||
#include "task_interface.hpp"
|
#include "task_interface.hpp"
|
||||||
|
|
||||||
|
#define NOTHING_AVAILABLE_SLEEP_TIME 500ms
|
||||||
|
|
||||||
class Downloader {
|
class Downloader {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -45,7 +47,7 @@ class Downloader {
|
||||||
void thread_run();
|
void thread_run();
|
||||||
bool fetch_tasks(size_t n);
|
bool fetch_tasks(size_t n);
|
||||||
bool fetch_design(const db::uuid_t& id, std::string& design);
|
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<std::thread> downloader_thread;
|
std::unique_ptr<std::thread> downloader_thread;
|
||||||
std::unique_ptr<db::Connection> conn;
|
std::unique_ptr<db::Connection> conn;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue