remove a code to finish job requests when winix exits

Actually there was a bug and the code was not correctly waiting for the job requests.
This commit is contained in:
2024-07-02 17:30:35 +02:00
parent 20b40597fd
commit b2f4c065ea
5 changed files with 10 additions and 31 deletions

View File

@@ -1526,9 +1526,9 @@ void System::DeleteOldRequests(bool leave_one_object)
while( i != req_tab.end() )
{
// leave at least one object (even if it is finished)
if( i->run_state == Request::RunState::finished && (!leave_one_object || req_tab.size() > 1) )
if( (i->run_state == Request::RunState::finished || i->run_state == Request::RunState::not_assigned) && (!leave_one_object || req_tab.size() > 1) )
{
log << log3 << "System: removing finished request " << cur->request << logend;
log << log3 << "System: removing a finished or not assigned request " << cur->request << logend;
std::list<Request>::iterator old_i = i;
++i;
req_tab.erase(old_i);