Some small updates

This commit is contained in:
WolverinDEV
2020-03-02 21:00:18 +01:00
parent 12d86cbfea
commit dfb61b9fea
4 changed files with 22 additions and 15 deletions
+1
View File
@@ -139,6 +139,7 @@ std::shared_ptr<GeneralStatistics> StatisticManager::general_statistics() {
deque<unique_ptr<GeneralStatisticEntry>> entries;
//TODO: Calculate web clients!
auto result = sql::command(this->license_manager->sql(), "SELECT `keyId`, `unique_id`, `timestamp`,`server`,`clients`,`music` FROM `history_online` WHERE `timestamp` > :time ORDER BY `timestamp` ASC",
variable{":time", duration_cast<milliseconds>(system_clock::now().time_since_epoch() - hours(2) - minutes(10)).count()}) //10min as buffer
.query(std::function<decltype(parse_general_entry)>{parse_general_entry}, entries, true);