Files
localTube/Modules/Server/src/worker.hpp
Simon Hardt 7903b0b8c5 Init
2021-05-27 15:53:00 +02:00

28 lines
422 B
C++

//
// Created by s-har on 25.05.2021.
//
#pragma once
#include <vector>
#include <string>
#include <thread>
#include <soci/session.h>
#include "tables.hpp"
class Worker
{
std::thread thread;
soci::session& sql;
std::string output_path = "./downloads";
public:
explicit Worker(soci::session& sql);
[[noreturn]] void loop();
private:
bool getTask(File& task);
bool download(File& task);
};