mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #649, skip reading of info objects if only caches are used and emit signals when syncronized from cache
(applied after 1st performance fix for cache was ready) * utility functions to detect if only caches are used * renamed some functions * renamed some db flags and added new ones
This commit is contained in:
@@ -30,7 +30,8 @@ namespace BlackCore
|
||||
CInfoDataReader::CInfoDataReader(QObject *owner, const CDatabaseReaderConfigList &config) :
|
||||
CDatabaseReader(owner, config, "CInfoDataReader")
|
||||
{
|
||||
// void
|
||||
// init to avoid threading issues
|
||||
getBaseUrl();
|
||||
}
|
||||
|
||||
CDbInfoList CInfoDataReader::getDbInfoObjects() const
|
||||
@@ -121,6 +122,8 @@ namespace BlackCore
|
||||
// wrap pointer, make sure any exit cleans up reply
|
||||
// required to use delete later as object is created in a different thread
|
||||
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
|
||||
if (this->isAbandoned()) { return; }
|
||||
|
||||
QString urlString(nwReply->url().toString());
|
||||
CDatabaseReader::JsonDatastoreResponse res = this->setStatusAndTransformReplyIntoDatastoreResponse(nwReply.data());
|
||||
if (res.hasErrorMessage())
|
||||
@@ -146,9 +149,9 @@ namespace BlackCore
|
||||
CLogMessage(this).info("Read %1 %2 from %3") << n << CEntityFlags::flagToString(CEntityFlags::InfoObjectEntity) << urlString;
|
||||
}
|
||||
|
||||
CUrl CInfoDataReader::getBaseUrl() const
|
||||
const CUrl &CInfoDataReader::getBaseUrl()
|
||||
{
|
||||
const CUrl baseUrl(sApp->getGlobalSetup().getDbInfoReaderUrl());
|
||||
static const CUrl baseUrl(sApp->getGlobalSetup().getDbInfoReaderUrl());
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
@@ -156,6 +159,5 @@ namespace BlackCore
|
||||
{
|
||||
return getBaseUrl().withAppendedPath("service/jsondbinfo.php");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user