Use DB write server for /load

This commit is contained in:
Zwelf 2020-07-19 12:22:40 +02:00
parent 3e1324dd0a
commit d71bf5cef1
2 changed files with 3 additions and 3 deletions

View file

@ -1423,10 +1423,10 @@ void CScore::LoadTeam(const char* Code, int ClientID)
Tmp->m_NumPlayer++;
}
}
m_pPool->Execute(LoadTeamThread, std::move(Tmp), "load team");
m_pPool->ExecuteWrite(LoadTeamThread, std::move(Tmp), "load team");
}
bool CScore::LoadTeamThread(IDbConnection *pSqlServer, const ISqlData *pGameData)
bool CScore::LoadTeamThread(IDbConnection *pSqlServer, const ISqlData *pGameData, bool Failure)
{
const CSqlTeamLoad *pData = dynamic_cast<const CSqlTeamLoad *>(pGameData);
pData->m_pResult->m_Status = CScoreSaveResult::LOAD_FAILED;

View file

@ -291,7 +291,7 @@ class CScore
static bool GetSavesThread(IDbConnection *pSqlServer, const ISqlData *pGameData);
static bool SaveTeamThread(IDbConnection *pSqlServer, const ISqlData *pGameData, bool Failure);
static bool LoadTeamThread(IDbConnection *pSqlServer, const ISqlData *pGameData);
static bool LoadTeamThread(IDbConnection *pSqlServer, const ISqlData *pGameData, bool Failure);
static bool SaveScoreThread(IDbConnection *pSqlServer, const ISqlData *pGameData, bool Failure);
static bool SaveTeamScoreThread(IDbConnection *pSqlServer, const ISqlData *pGameData, bool Failure);