fix: 正确排除已经记录的完成的作业

This commit is contained in:
陈浩南 2024-05-05 09:57:38 +08:00
parent 60607385a4
commit 3a4ba7a94f

View File

@ -50,7 +50,7 @@ namespace hpcstat::sql
auto not_logged_job = all_job | ranges::to<std::set<unsigned>>;
for (auto it : conn->select_query<FinishJobData>()
.order_by<FinishJobTable::field_t<"id">>(zxorm::order_t::DESC)
.where_many(FinishJobTable::field_t<"id">().in(all_job))
.where_many(FinishJobTable::field_t<"job_id">().in(all_job))
.exec())
if (jobid_submit_time[it.JobId] == it.SubmitTime)
not_logged_job.erase(it.JobId);