Skip to content

Instantly share code, notes, and snippets.

def start_postprocessing_daemon(source_dir, target_dir, segments_suffix):
ensure_directory(target_dir)
def callback(monitored_path, event_path, event, discovered_through):
# logic always postprocesses the file before the current one, means last one will be left
if event_path.endswith("."+segments_suffix):
filename = os.path.basename(event_path)
counter = int(filename[7:14])
if counter == 0: return
#pragma once
#include <functional>
#include <vector>
#include <mutex>
#include <thread>
#include <condition_variable>
#include <stlab/concurrency/task.hpp>
#include <boost/circular_buffer.hpp>