Compare commits
2 Commits
b82181d3f3
...
94f5e376d4
Author | SHA1 | Date | |
---|---|---|---|
94f5e376d4 | |||
9c53398fc9 |
@ -581,24 +581,40 @@ std::vector<std::shared_ptr<PackageConf>> CiLogic::get_config(const std::string
|
||||
: (a->package->name > b->package->name);
|
||||
}
|
||||
} else if (sort_by == "build_status") {
|
||||
if (a->successful_task_count() != b->successful_task_count()) {
|
||||
{
|
||||
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());
|
||||
} else if (a->successful_or_pending_task_count() != b->successful_or_pending_task_count()) {
|
||||
? (a_successful_task_count < b_successful_task_count)
|
||||
: (a_successful_task_count > b_successful_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());
|
||||
} else if (a->successful_or_queued_task_count() != b->successful_or_queued_task_count()) {
|
||||
? (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());
|
||||
} else {
|
||||
? (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;
|
||||
};
|
||||
|
@ -40,6 +40,7 @@ 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user