diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-01 09:41:28 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-01 10:02:41 +0200 |
commit | 8d2d52fcfd3c42a82b7f86c6f3c5009461f1de9f (patch) | |
tree | 042e2db12927d289fce3a2fab8486e03ac4c9049 /common/queryrunner.h | |
parent | 53b76e66f5527a5f9442173279b0a01f1f07da46 (diff) | |
download | sink-8d2d52fcfd3c42a82b7f86c6f3c5009461f1de9f.tar.gz sink-8d2d52fcfd3c42a82b7f86c6f3c5009461f1de9f.zip |
Avoid missing revision updates while a query is running.
Instead we have to remember that something has changed and rerun an
incremental query.
Diffstat (limited to 'common/queryrunner.h')
-rw-r--r-- | common/queryrunner.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/queryrunner.h b/common/queryrunner.h index 35093e2..e449570 100644 --- a/common/queryrunner.h +++ b/common/queryrunner.h | |||
@@ -77,7 +77,7 @@ private: | |||
77 | * QueryRunner has to keep ResourceAccess alive in order to keep getting updates. | 77 | * QueryRunner has to keep ResourceAccess alive in order to keep getting updates. |
78 | */ | 78 | */ |
79 | template <typename DomainType> | 79 | template <typename DomainType> |
80 | class QueryRunner : public QueryRunnerBase | 80 | class SINK_EXPORT QueryRunner : public QueryRunnerBase |
81 | { | 81 | { |
82 | public: | 82 | public: |
83 | QueryRunner(const Sink::Query &query, const Sink::ResourceContext &context, const QByteArray &bufferType, const Sink::Log::Context &logCtx); | 83 | QueryRunner(const Sink::Query &query, const Sink::ResourceContext &context, const QByteArray &bufferType, const Sink::Log::Context &logCtx); |
@@ -91,6 +91,11 @@ public: | |||
91 | 91 | ||
92 | typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr emitter(); | 92 | typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr emitter(); |
93 | 93 | ||
94 | /** | ||
95 | * For testing only. | ||
96 | */ | ||
97 | void delayNextQuery(); | ||
98 | |||
94 | private: | 99 | private: |
95 | void fetch(const Sink::Query &query, const QByteArray &bufferType); | 100 | void fetch(const Sink::Query &query, const QByteArray &bufferType); |
96 | KAsync::Job<void> incrementalFetch(const Sink::Query &query, const QByteArray &bufferType); | 101 | KAsync::Job<void> incrementalFetch(const Sink::Query &query, const QByteArray &bufferType); |
@@ -106,4 +111,6 @@ private: | |||
106 | bool mInitialQueryComplete = false; | 111 | bool mInitialQueryComplete = false; |
107 | bool mQueryInProgress = false; | 112 | bool mQueryInProgress = false; |
108 | bool mRequestFetchMore = false; | 113 | bool mRequestFetchMore = false; |
114 | bool mDelayNextQuery = false; | ||
115 | bool mRevisionChangedMeanwhile = false; | ||
109 | }; | 116 | }; |