mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
карта блок-в. Блокировка правильная. Множ. доступ
This commit is contained in:
@@ -44,7 +44,7 @@ void UpdateController::initialize(CommonClientHandler *commonClientHandler,DataP
|
||||
|
||||
void UpdateController::changeAssetVersion(QString versionName)
|
||||
{
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
qDebug() << "UpdateController thread ID " << QThread::currentThreadId();
|
||||
currentStreamingPath = assetManager->setVersion(versionName);
|
||||
setUpCurrentServerHash();
|
||||
@@ -52,21 +52,21 @@ void UpdateController::changeAssetVersion(QString versionName)
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::HASH_READY);
|
||||
commonClientHandler->sendCurrentVersionToAllClient();
|
||||
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
}
|
||||
|
||||
void UpdateController::createCopyVersion(QString versionName,QString newVersionName,QString author)
|
||||
{
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
assetManager->createCopyVersion(versionName,newVersionName,author);
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
}
|
||||
|
||||
void UpdateController::deleteAssetVersion(QString versionName)
|
||||
{
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
assetManager->deleteVersion(versionName);
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
}
|
||||
|
||||
void UpdateController::compareFiles(ClientHandler* handler, QByteArray array)
|
||||
@@ -94,7 +94,8 @@ void UpdateController::calculateFullHash()
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
qDebug() << "Start calculate... ";
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::BUSY);
|
||||
bool res = emit signal_BlockAutorization(true, "SERVER", "CalculateFullHash");
|
||||
//auto *list = calculateHash(buildPath);
|
||||
|
||||
hashCalculator->calculateHashes(buildPath);
|
||||
@@ -104,8 +105,8 @@ void UpdateController::calculateFullHash()
|
||||
calculateSharedHash();
|
||||
Logger::instance().log("Calculate hash complete");
|
||||
qDebug() << "Calculate time " << timer.elapsed();
|
||||
commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
|
||||
//commonClientHandler->slot_sendPacketToAllClients(PacketType::FREE);
|
||||
res = emit signal_BlockAutorization(false, "SERVER", "CalculateFullHash");
|
||||
}
|
||||
|
||||
void UpdateController::calculateFullHashWithSetup()
|
||||
|
||||
Reference in New Issue
Block a user