///////////////////////////////////////////////// // TWebPgFetchPersist TWebPgFetchPersist::TWebPgFetchPersist(const TStr& _SaveFName, const bool& _RepeatFailedRequests, const bool& _ReportState, const TStr& _ReportPrefix, const PNotify& _Notify) : SaveFName(_SaveFName), RepeatFailedRequests(_RepeatFailedRequests), ReportState(_ReportState), ReportPrefix(_ReportPrefix), Notify(_Notify) { PutMxConns(10); PutTimeOutMSecs(30 * 1000); if (SaveFName != "" && TFile::Exists(SaveFName)) { TFIn FIn(SaveFName); uint64 FileLen = TFile::GetSize(SaveFName); if (FileLen > 0) TNotify::StdNotify->OnStatusFmt("Loading %.2f MB of pending web requests...", FileLen / (double) TInt::Mega); Load(FIn); if (FileLen > 0) TNotify::StdNotify->OnStatus("Loading finished."); } }
///////////////////////////////////////////////// // Amazon-Page-Fetch TAmazonFetch::TAmazonFetch(): TWebPgFetch(), ItemItemIdH(100000), XmlSOut(){ PutMxConns(30); XmlSOut=TFOut::New("amazon.xml"); }