<commit_before>/**
 * This file is part of the CernVM File System.
 */

#define __STDC_FORMAT_MACROS

#include "sync_mediator.h"

#include <fcntl.h>
#include <inttypes.h>
#include <unistd.h>

#include <cassert>
#include <cstdio>
#include <cstdlib>

#include "catalog_virtual.h"
#include "compression.h"
#include "fs_traversal.h"
#include "hash.h"
#include "smalloc.h"
#include "sync_union.h"
#include "upload.h"
#include "util/posix.h"
#include "util/string.h"
#include "util_concurrency.h"

using namespace std;  // NOLINT

namespace publish {

AbstractSyncMediator::~AbstractSyncMediator(){};

SyncMediator::SyncMediator(catalog::WritableCatalogManager *catalog_manager,
                           const SyncParameters *params) :
  catalog_manager_(catalog_manager),
  union_engine_(NULL),
  handle_hardlinks_(false),
  params_(params),
  changed_items_(0)
{
  int retval = pthread_mutex_init(&lock_file_queue_, NULL);
  assert(retval == 0);

  params->spooler->RegisterListener(&SyncMediator::PublishFilesCallback, this);

  LogCvmfs(kLogPublish, kLogStdout, "Processing changes...");
}


SyncMediator::~SyncMediator() {
  pthread_mutex_destroy(&lock_file_queue_);<commit_msg>fix cpplint<commit_after>/**
 * This file is part of the CernVM File System.
 */

#define __STDC_FORMAT_MACROS

#include "sync_mediator.h"

#include <fcntl.h>
#include <inttypes.h>
#include <unistd.h>

#include <cassert>
#include <cstdio>
#include <cstdlib>

#include "catalog_virtual.h"
#include "compression.h"
#include "fs_traversal.h"
#include "hash.h"
#include "smalloc.h"
#include "sync_union.h"
#include "upload.h"
#include "util/posix.h"
#include "util/string.h"
#include "util_concurrency.h"

using namespace std;  // NOLINT

namespace publish {

AbstractSyncMediator::~AbstractSyncMediator(){}

SyncMediator::SyncMediator(catalog::WritableCatalogManager *catalog_manager,
                           const SyncParameters *params) :
  catalog_manager_(catalog_manager),
  union_engine_(NULL),
  handle_hardlinks_(false),
  params_(params),
  changed_items_(0)
{
  int retval = pthread_mutex_init(&lock_file_queue_, NULL);
  assert(retval == 0);

  params->spooler->RegisterListener(&SyncMediator::PublishFilesCallback, this);

  LogCvmfs(kLogPublish, kLogStdout, "Processing changes...");
}


SyncMediator::~SyncMediator() {
  pthread_mutex_destroy(&lock_file_queue_);
{'fraction_non_alphanumeric': 0.1337579617834395, 'fraction_numerical': 0.0016985138004246285, 'mean_word_length': 5.693181818181818, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2811776', 'n_tokens_mistral': 840, 'n_tokens_neox': 819, 'n_words': 154}