Commit fdeb90cb authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Avoid tight loops on the stager in case of high level error (e.g. no ORASTAGERCONFIG present)

parent 8698197a
......@@ -71,6 +71,9 @@ castor::IObject* castor::stager::daemon::BaseRequestSvcThread::select() throw()
castor::dlf::Param("BackTrace", e.backtrace()),
castor::dlf::Param("Code", e.code())};
castor::dlf::dlf_writep(nullCuuid, DLF_LVL_ERROR, castor::stager::daemon::STAGER_SERVICES_EXCEPTION, 4, params);
// as this method is supposed to wait for the next request to come,
// we should sleep a bit to avoid tight loops
sleep(1);
return 0;
}
}
......
......@@ -74,6 +74,9 @@ castor::IObject* castor::stager::daemon::BulkStageReqSvcThread::select() throw()
castor::dlf::Param("Message", e.getMessage().str()),
castor::dlf::Param("Code", e.code())};
castor::dlf::dlf_writep(nullCuuid, DLF_LVL_ERROR, castor::stager::daemon::STAGER_SERVICES_EXCEPTION, 3, params);
// as this method is supposed to wait for the next request to come,
// we should sleep a bit to avoid tight loops
sleep(1);
return 0;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment