Compare commits

..

No commits in common. "94f5e376d4c6c0711010cf155fe480b5dba83cb3" and "b82181d3f320cee777333b77f22336f026e91996" have entirely different histories.

2 changed files with 16 additions and 33 deletions

View File

@ -581,39 +581,23 @@ std::vector<std::shared_ptr<PackageConf>> CiLogic::get_config(const std::string
: (a->package->name > b->package->name);
}
} else if (sort_by == "build_status") {
{
int a_successful_task_count = a->successful_task_count();
int b_successful_task_count = b->successful_task_count();
if (a_successful_task_count != b_successful_task_count) {
return (order == "asc")
? (a_successful_task_count < b_successful_task_count)
: (a_successful_task_count > b_successful_task_count);
}
if (a->successful_task_count() != b->successful_task_count()) {
return (order == "asc")
? (a->successful_task_count() < b->successful_task_count())
: (a->successful_task_count() > b->successful_task_count());
} else if (a->successful_or_pending_task_count() != b->successful_or_pending_task_count()) {
return (order == "asc")
? (a->successful_or_pending_task_count() < b->successful_or_pending_task_count())
: (a->successful_or_pending_task_count() > b->successful_or_pending_task_count());
} else if (a->successful_or_queued_task_count() != b->successful_or_queued_task_count()) {
return (order == "asc")
? (a->successful_or_queued_task_count() < b->successful_or_queued_task_count())
: (a->successful_or_queued_task_count() > b->successful_or_queued_task_count());
} else {
return (order == "asc")
? (a->total_task_count() < b->total_task_count())
: (a->total_task_count() > b->total_task_count());
}
{
int a_successful_or_pending_task_count = a->successful_or_pending_task_count();
int b_successful_or_pending_task_count = b->successful_or_pending_task_count();
if (a_successful_or_pending_task_count != b_successful_or_pending_task_count) {
return (order == "asc")
? (a_successful_or_pending_task_count < b_successful_or_pending_task_count)
: (a_successful_or_pending_task_count > b_successful_or_pending_task_count);
}
}
{
int a_successful_or_queued_task_count = a->successful_or_queued_task_count();
int b_successful_or_queued_task_count = b->successful_or_queued_task_count();
if (a_successful_or_queued_task_count != b_successful_or_queued_task_count) {
return (order == "asc")
? (a_successful_or_queued_task_count < b_successful_or_queued_task_count)
: (a_successful_or_queued_task_count > b_successful_or_queued_task_count);
}
}
return (order == "asc")
? (a->total_task_count() < b->total_task_count())
: (a->total_task_count() > b->total_task_count());
}
// if invalid sort_by
return false;

View File

@ -40,7 +40,6 @@ public:
std::unique_lock lock(lock_);
std::string log_str = str.ends_with('\n') ? str : str + '\n';
if (str.empty() || last_data_str == log_str) { return; }
else if (str.contains("dpkg-source: warning: ignoring deletion of file")) { return; }
data += std::format("[{}] {}", get_current_utc_time("%Y-%m-%dT%H:%M:%SZ"), log_str);
last_data_str = log_str;
}