diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-05 14:02:23 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-03-05 14:02:23 +0000 |
| commit | fe8fea56ca586df592470d82bcec93d7bc8b27ba (patch) | |
| tree | 8852a13c4339b051f5fa4d013fcf755e238834d2 /src/RequestGroupMan.h | |
| parent | db4ed87f7a944a8d177ca8c13efc68f127b7b37d (diff) | |
2010-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Only execute RequestGroupMan::fillRequestGroupFromReserver() when
queue maintenance is requested by RequestGroup to avoid to call
the function unnecessarily.
* src/FillRequestGroupCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
Diffstat (limited to 'src/RequestGroupMan.h')
| -rw-r--r-- | src/RequestGroupMan.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/RequestGroupMan.h b/src/RequestGroupMan.h index 6f63ca92..df112794 100644 --- a/src/RequestGroupMan.h +++ b/src/RequestGroupMan.h @@ -77,6 +77,8 @@ private: // truf if XML-RPC is enabled. bool _xmlRpc; + bool _queueCheck; + std::string formatDownloadResult(const std::string& status, const SharedHandle<DownloadResult>& downloadResult) const; @@ -254,6 +256,24 @@ public: { _maxSimultaneousDownloads = max; } + + // Call this function if _requestGroups queue should be maintained. + // This function is added to reduce the call of maintenance, but at + // the same time, it provides fast maintenance reaction. + void requestQueueCheck() + { + _queueCheck = true; + } + + void clearQueueCheck() + { + _queueCheck = false; + } + + bool queueCheckRequested() const + { + return _queueCheck; + } }; typedef SharedHandle<RequestGroupMan> RequestGroupManHandle; |
