Fixing daggyr issues when reporting on tasks with very large outputs

(>10kb).

Squashed commit of the following:

commit b87fa418b4aca78928186a8fa992bef701e044a4
Author: Ian Roddis <tech@kinesin.ca>
Date:   Mon Feb 14 12:55:34 2022 -0400

    removing memory leak

commit 5e284ab92dbea991262a08c0cd50d6fc2f912e3b
Author: Ian Roddis <tech@kinesin.ca>
Date:   Mon Feb 14 11:58:57 2022 -0400

    Speeding up serialization, fixing payload sizing issue on daggyr

commit e5e358820da4c2587741abdc3b6b103e5a4d4dd3
Author: Ian Roddis <tech@kinesin.ca>
Date:   Sun Feb 13 22:24:04 2022 -0400

    changing newlines to std::endl for flush goodness

commit 705ec86b75be947e64f4124ec8017cba2c8465e6
Author: Ian Roddis <tech@kinesin.ca>
Date:   Sun Feb 13 22:16:56 2022 -0400

    adding more logging

commit aa3db9c23e55da7a0523dc57e268b605ce8faac3
Author: Ian Roddis <tech@kinesin.ca>
Date:   Sun Feb 13 22:13:56 2022 -0400

    Adding threadid

commit 3b1a0f1333b2d43bc5ecad0746435504babbaa61
Author: Ian Roddis <tech@kinesin.ca>
Date:   Sun Feb 13 22:13:24 2022 -0400

    Adding some debugging

commit 804507e65251858fa597b7c27bcece8d8dfd589d
Author: Ian Roddis <tech@kinesin.ca>
Date:   Sun Feb 13 21:52:53 2022 -0400

    Removing curl global cleanup
This commit is contained in:
Ian Roddis
2022-02-15 11:22:21 -04:00
parent 0d365f3a7b
commit 71756d9ec2
13 changed files with 238 additions and 31 deletions

View File

@@ -43,6 +43,7 @@ namespace daggy::daggyr {
private:
void createDescription();
void serializeResults();
bool handleAuth(const Pistache::Rest::Request &request);
@@ -59,11 +60,17 @@ namespace daggy::daggyr {
GeneralLogger &logger_;
executors::task::ForkingTaskExecutor executor_;
std::thread serializer_;
std::atomic<bool> running_;
using TaskID = std::pair<DAGRunID, std::string>;
Capacity maxCapacity_;
std::mutex rtGuard_;
std::unordered_map<TaskID, daggy::executors::task::TaskFuture>
runningTasks_;
std::mutex resultsGuard_;
std::unordered_map<TaskID, Future<std::string>>
results_;
};
} // namespace daggy::daggyr