private void AddFileState(FileState fileState)
        {
            FileData locFileData = null;

            if (fileState.IsDeleted)
            {
                locFileData = new FileData(Guid.NewGuid(), fileState.Path, fileState.OldPath, true, fileState.TimeSpan, "");
                _log.Info($"Add entry (delete) {fileState.Path}");
            }
            else
            {
                Guid g = Guid.NewGuid();
                locFileData = new FileData(g, fileState.Path, fileState.OldPath, fileState.IsDeleted, fileState.TimeSpan, ComputeContentHashWithCompress(fileState.Path, g.ToString()));
                _log.Info($"Add entry  {fileState.Path}");
            }
            _repository.Insert(locFileData);
        }
 protected override void Work()
 {
     while (!CancelFlag.IsCancellationRequested)
     {
         FileState temp = _changeBuf.Dequeue(10);
         if (temp != null)
         {
             _log.Info("Add file state");
             AddFileState(temp);
         }
         else
         {
             // поспим 5 секунд, чтоб не жрать процессор этим циклом, пока что у нас нет подходящих FileState
             Sleep(1000);
         }
     }
 }