Add tags to database

This commit is contained in:
2023-05-21 10:37:09 +08:00
parent 48b6393f9a
commit f1a483ff43
7 changed files with 139 additions and 27 deletions

View File

@@ -12,11 +12,13 @@ export class AlreadyClosedError extends Error {
export class TaskManager {
#closed = false;
cfg;
client;
db;
running_tasks: Map<number, Promise<Task>>;
max_task_count;
constructor(cfg: Config) {
this.cfg = cfg;
this.client = new Client(cfg);
this.db = new EhDb(cfg.base);
this.running_tasks = new Map();
@@ -114,7 +116,7 @@ export class TaskManager {
if (task.type == TaskType.Download) {
this.running_tasks.set(
task.id,
download_task(task, this.client, this.db),
download_task(task, this.client, this.db, this.cfg),
);
}
}