Ref T149, utility functions for pending URLs

* Do not call read twice in info reader
* Threadsafe utility functions
This commit is contained in:
Klaus Basan
2017-09-17 23:35:50 +02:00
committed by Mathew Sutcliffe
parent 52caf795d1
commit 0cf308450e
5 changed files with 50 additions and 0 deletions

View File

@@ -41,6 +41,12 @@ namespace BlackMisc
return this->findBy(&CUrlLog::isPending, true);
}
CUrlLogList CUrlLogList::findOutdatedPending(int outdatedOffsetMs) const
{
if (this->isEmpty()) { return CUrlLogList(); }
return this->findPending().findBeforeNowMinusOffset(outdatedOffsetMs);
}
CUrlLogList CUrlLogList::findErrors() const
{
return this->findBy(&CUrlLog::isPending, false, &CUrlLog::isSuccess, false);