mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
do not init caching for asset requests in domain-server
This commit is contained in:
parent
6e6f52236e
commit
946474c615
7 changed files with 7 additions and 10 deletions
|
@ -735,7 +735,6 @@ void DomainServer::setupNodeListAndAssignments() {
|
|||
_assetClientThread.setObjectName("AssetClient Thread");
|
||||
auto assetClient = DependencyManager::set<AssetClient>();
|
||||
assetClient->moveToThread(&_assetClientThread);
|
||||
QObject::connect(&_assetClientThread, &QThread::started, assetClient.data(), &AssetClient::init);
|
||||
_assetClientThread.start();
|
||||
|
||||
// add whatever static assignments that have been parsed to the queue
|
||||
|
|
|
@ -53,7 +53,7 @@ AssetClient::AssetClient() {
|
|||
this, &AssetClient::handleNodeClientConnectionReset);
|
||||
}
|
||||
|
||||
void AssetClient::init() {
|
||||
void AssetClient::initCaching() {
|
||||
Q_ASSERT(QThread::currentThread() == thread());
|
||||
|
||||
// Setup disk cache if not already
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
Q_INVOKABLE AssetUpload* createUpload(const QByteArray& data);
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void initCaching();
|
||||
|
||||
void cacheInfoRequest(QObject* reciever, QString slot);
|
||||
MiniPromise::Promise cacheInfoRequestAsync(MiniPromise::Promise deferred = nullptr);
|
||||
|
|
|
@ -72,9 +72,8 @@ QByteArray loadFromCache(const QUrl& url) {
|
|||
qCDebug(asset_client) << url.toDisplayString() << "not in disk cache";
|
||||
}
|
||||
|
||||
} else {
|
||||
qCWarning(asset_client) << "No disk cache to load assets from.";
|
||||
}
|
||||
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
|
@ -96,9 +95,8 @@ bool saveToCache(const QUrl& url, const QByteArray& file) {
|
|||
}
|
||||
qCWarning(asset_client) << "Could not save" << url.toDisplayString() << "to disk cache.";
|
||||
}
|
||||
} else {
|
||||
qCWarning(asset_client) << "No disk cache to save assets to.";
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ bool BaseAssetScriptingInterface::initializeCache() {
|
|||
}
|
||||
|
||||
// attempt to initialize the cache
|
||||
QMetaObject::invokeMethod(assetClient().data(), "init");
|
||||
QMetaObject::invokeMethod(assetClient().data(), "initCaching");
|
||||
|
||||
Promise deferred = makePromise("BaseAssetScriptingInterface--queryCacheStatus");
|
||||
deferred->then([this](QVariantMap result) {
|
||||
|
|
|
@ -31,7 +31,7 @@ ResourceManager::ResourceManager() {
|
|||
|
||||
auto assetClient = DependencyManager::set<AssetClient>();
|
||||
assetClient->moveToThread(&_thread);
|
||||
QObject::connect(&_thread, &QThread::started, assetClient.data(), &AssetClient::init);
|
||||
QObject::connect(&_thread, &QThread::started, assetClient.data(), &AssetClient::initCaching);
|
||||
|
||||
_thread.start();
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ ATPClientApp::ATPClientApp(int argc, char* argv[]) :
|
|||
}
|
||||
|
||||
auto assetClient = DependencyManager::set<AssetClient>();
|
||||
assetClient->init();
|
||||
assetClient->initCaching();
|
||||
|
||||
if (_verbose) {
|
||||
qDebug() << "domain-server address is" << _domainServerAddress;
|
||||
|
|
Loading…
Reference in a new issue