mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
bugfix: streaming assets folder hash
This commit is contained in:
@@ -20,6 +20,8 @@ kanban-plugin: board
|
|||||||
|
|
||||||
- [ ] Добавить обновление инструктора, если он перелогинился
|
- [ ] Добавить обновление инструктора, если он перелогинился
|
||||||
- [ ] FIM проверять на null задачу
|
- [ ] FIM проверять на null задачу
|
||||||
|
- [ ] добавить в settings адрес и булку мат модели
|
||||||
|
- [ ] Прибратся скриптах вьюхи для таск системы
|
||||||
|
|
||||||
|
|
||||||
## feature client QT
|
## feature client QT
|
||||||
@@ -36,6 +38,7 @@ kanban-plugin: board
|
|||||||
- [ ] добавить подключение без DB
|
- [ ] добавить подключение без DB
|
||||||
- [ ] ПЕРЕВЕСТИ все действия под операции и формировать процент из них
|
- [ ] ПЕРЕВЕСТИ все действия под операции и формировать процент из них
|
||||||
- [ ] блокировать выгрузку под инструктором, если режим версия base
|
- [ ] блокировать выгрузку под инструктором, если режим версия base
|
||||||
|
- [ ] Ускорить раздачу клиенту
|
||||||
|
|
||||||
|
|
||||||
## NOW
|
## NOW
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void SendSystem::sendFileBlock(QString path)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
socket->waitForBytesWritten(10);
|
//socket->waitForBytesWritten(10);
|
||||||
|
|
||||||
if(file.open(QFile::ReadOnly))
|
if(file.open(QFile::ReadOnly))
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ void SendSystem::sendFileBlock(QString path)
|
|||||||
{
|
{
|
||||||
QByteArray data = file.read(1025*250);
|
QByteArray data = file.read(1025*250);
|
||||||
stream << data;
|
stream << data;
|
||||||
socket->waitForBytesWritten(10);
|
//socket->waitForBytesWritten(10);
|
||||||
|
|
||||||
if(socket->state() == QAbstractSocket::UnconnectedState) break;
|
if(socket->state() == QAbstractSocket::UnconnectedState) break;
|
||||||
countSend++;
|
countSend++;
|
||||||
@@ -84,8 +84,8 @@ void SendSystem::sendFileBlock(QString path)
|
|||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
countSend = 0;
|
countSend = 0;
|
||||||
socket->waitForBytesWritten(10);
|
// socket->waitForBytesWritten(10);
|
||||||
socket->waitForReadyRead(20);
|
// socket->waitForReadyRead(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendSystem::sendVersion()
|
void SendSystem::sendVersion()
|
||||||
@@ -201,6 +201,7 @@ void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
|
|||||||
socket->waitForBytesWritten();
|
socket->waitForBytesWritten();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
socket->flush();
|
||||||
socket->waitForReadyRead(2000);
|
socket->waitForReadyRead(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,12 +237,12 @@ void SendSystem::updateFiles(QList<FileData> fileSendList, QList<FileData> delet
|
|||||||
if (data.hash == "FOLDER")
|
if (data.hash == "FOLDER")
|
||||||
{
|
{
|
||||||
sendFolderBlock(data.path);
|
sendFolderBlock(data.path);
|
||||||
socket->waitForReadyRead(100);
|
socket->waitForBytesWritten();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sendFileBlock(data.path);
|
sendFileBlock(data.path);
|
||||||
socket->waitForReadyRead(100);
|
socket->waitForBytesWritten();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isSendStopped) return;
|
if(isSendStopped) return;
|
||||||
|
|||||||
@@ -187,6 +187,10 @@ void UpdateController::setUpCurrentServerHash()
|
|||||||
{
|
{
|
||||||
QList<FileData> *fileList = new QList<FileData>;
|
QList<FileData> *fileList = new QList<FileData>;
|
||||||
fileList->append(*calculateHash(buildPath));
|
fileList->append(*calculateHash(buildPath));
|
||||||
|
FileData *streamingFolder = new FileData;
|
||||||
|
streamingFolder->hash = "FOLDER";
|
||||||
|
streamingFolder->path = buildDataPath + streamingAssetsFolderName;
|
||||||
|
fileList->append(*streamingFolder);
|
||||||
fileList->append(*calculateHash(currentStreamingPath));
|
fileList->append(*calculateHash(currentStreamingPath));
|
||||||
assetManager->prepareLocalPathList(fileList);
|
assetManager->prepareLocalPathList(fileList);
|
||||||
|
|
||||||
@@ -309,7 +313,7 @@ QList<FileData>* UpdateController::calculateHash(QString path)
|
|||||||
filter << "*";
|
filter << "*";
|
||||||
QList<FileData> *files = new QList<FileData>;
|
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())
|
while (dirIterator.hasNext())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user