mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
DB reader, doWorkCheck before writing cache. In case shutdown takes place in-between.
This commit is contained in:
@@ -292,6 +292,7 @@ namespace BlackCore
|
||||
Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
const int n = codes.size();
|
||||
qint64 latestTimestamp = codes.latestTimestampMsecsSinceEpoch(); // ignores duplicates
|
||||
if (n > 0 && latestTimestamp < 0)
|
||||
@@ -342,6 +343,7 @@ namespace BlackCore
|
||||
Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
const int n = codes.size();
|
||||
qint64 latestTimestamp = codes.latestTimestampMsecsSinceEpoch();
|
||||
if (n > 0 && latestTimestamp < 0)
|
||||
@@ -382,6 +384,7 @@ namespace BlackCore
|
||||
countries = CCountryList::fromDatabaseJson(res);
|
||||
}
|
||||
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
const int n = countries.size();
|
||||
qint64 latestTimestamp = countries.latestTimestampMsecsSinceEpoch();
|
||||
if (n > 0 && latestTimestamp < 0)
|
||||
|
||||
Reference in New Issue
Block a user