GCC Code Coverage Report
Directory: cvmfs/ Exec Total Coverage
File: cvmfs/ingestion/task_register.cc Lines: 14 14 100.0 %
Date: 2019-02-03 02:48:13 Branches: 13 22 59.1 %

Line Branch Exec Source
1
/**
2
 * This file is part of the CernVM File System.
3
 */
4
5
#include "cvmfs_config.h"
6
#include "task_register.h"
7
8
#include <cassert>
9
10
#include "logging.h"
11
12
149
void TaskRegister::Process(FileItem *file_item) {
13
149
  assert(file_item != NULL);
14
149
  assert(!file_item->path().empty());
15
  assert(!file_item->has_legacy_bulk_chunk() ||
16

149
         !file_item->bulk_hash().IsNull());
17
149
  assert(file_item->nchunks_in_fly() == 0);
18

149
  assert((file_item->GetNumChunks() > 1) || !file_item->bulk_hash().IsNull());
19
149
  assert(file_item->GetNumChunks() != 1);
20
149
  assert(file_item->hash_suffix() == file_item->bulk_hash().suffix);
21
149
  assert(file_item->bulk_hash().algorithm == file_item->hash_algorithm());
22
23
  LogCvmfs(kLogSpooler, kLogVerboseMsg,
24
           "File '%s' processed (bulk hash: %s suffix: %c)",
25
           file_item->path().c_str(),
26
           file_item->bulk_hash().ToString().c_str(),
27
149
           file_item->hash_suffix());
28
29
  NotifyListeners(upload::SpoolerResult(0,
30
    file_item->path(),
31
    file_item->bulk_hash(),
32
    FileChunkList(*file_item->GetChunksPtr()),
33
149
    file_item->compression_algorithm()));
34
35
149
  delete file_item;
36
149
  tube_counter_->Pop();
37
149
}