| 44 | } |
| 45 | |
| 46 | void ArchivalReporter::Run() |
| 47 | { |
| 48 | { |
| 49 | std::lock_guard<std::mutex> lock(m_mutexRun); |
| 50 | m_manager.DeleteOldDataByExtension(ARCHIVE_TRACKS_FILE_EXTENSION); |
| 51 | m_manager.DeleteOldDataByExtension(ARCHIVE_TRACKS_ZIPPED_FILE_EXTENSION); |
| 52 | } |
| 53 | |
| 54 | while (m_isAlive) |
| 55 | { |
| 56 | std::unique_lock<std::mutex> lock(m_mutexRun); |
| 57 | m_cvDump.wait_for(lock, std::chrono::seconds(m_manager.IntervalBetweenDumpsSeconds()), |
| 58 | [this] { return !m_isAlive; }); |
| 59 | DumpToDisk(true); |
| 60 | m_manager.PrepareUpload(); |
| 61 | } |
| 62 | |
| 63 | LOG(LDEBUG, ("Exiting thread for dumping and uploading tracks")); |
| 64 | } |
| 65 | |
| 66 | void ArchivalReporter::Insert(routing::RouterType const & trackType, location::GpsInfo const & info, |
| 67 | traffic::SpeedGroup const & speedGroup) |
nothing calls this directly
no test coverage detected