bugfix: streaming assets folder hash

This commit is contained in:
semenov
2025-06-05 17:07:26 +03:00
parent 417ead9500
commit 73f2a707e4
3 changed files with 15 additions and 7 deletions

View File

@@ -20,6 +20,8 @@ kanban-plugin: board
- [ ] Добавить обновление инструктора, если он перелогинился
- [ ] FIM проверять на null задачу
- [ ] добавить в settings адрес и булку мат модели
- [ ] Прибратся скриптах вьюхи для таск системы
## feature client QT
@@ -36,6 +38,7 @@ kanban-plugin: board
- [ ] добавить подключение без DB
- [ ] ПЕРЕВЕСТИ все действия под операции и формировать процент из них
- [ ] блокировать выгрузку под инструктором, если режим версия base
- [ ] Ускорить раздачу клиенту
## NOW

View File

@@ -65,7 +65,7 @@ void SendSystem::sendFileBlock(QString path)
socket->waitForBytesWritten(10);
//socket->waitForBytesWritten(10);
if(file.open(QFile::ReadOnly))
{
@@ -73,7 +73,7 @@ void SendSystem::sendFileBlock(QString path)
{
QByteArray data = file.read(1025*250);
stream << data;
socket->waitForBytesWritten(10);
//socket->waitForBytesWritten(10);
if(socket->state() == QAbstractSocket::UnconnectedState) break;
countSend++;
@@ -84,8 +84,8 @@ void SendSystem::sendFileBlock(QString path)
file.close();
countSend = 0;
socket->waitForBytesWritten(10);
socket->waitForReadyRead(20);
// socket->waitForBytesWritten(10);
// socket->waitForReadyRead(20);
}
void SendSystem::sendVersion()
@@ -201,6 +201,7 @@ void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
socket->waitForBytesWritten();
}
socket->flush();
socket->waitForReadyRead(2000);
}
@@ -236,12 +237,12 @@ void SendSystem::updateFiles(QList<FileData> fileSendList, QList<FileData> delet
if (data.hash == "FOLDER")
{
sendFolderBlock(data.path);
socket->waitForReadyRead(100);
socket->waitForBytesWritten();
}
else
{
sendFileBlock(data.path);
socket->waitForReadyRead(100);
socket->waitForBytesWritten();
}
if(isSendStopped) return;

View File

@@ -187,6 +187,10 @@ void UpdateController::setUpCurrentServerHash()
{
QList<FileData> *fileList = new QList<FileData>;
fileList->append(*calculateHash(buildPath));
FileData *streamingFolder = new FileData;
streamingFolder->hash = "FOLDER";
streamingFolder->path = buildDataPath + streamingAssetsFolderName;
fileList->append(*streamingFolder);
fileList->append(*calculateHash(currentStreamingPath));
assetManager->prepareLocalPathList(fileList);
@@ -309,7 +313,7 @@ QList<FileData>* UpdateController::calculateHash(QString path)
filter << "*";
QList<FileData> *files = new QList<FileData>;
QDirIterator dirIterator(path,filter, QDir::AllEntries | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
QDirIterator dirIterator(path,filter, QDir::AllEntries, QDirIterator::Subdirectories);
while (dirIterator.hasNext())
{