mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-12 14:57:53 +02:00
Adding a removing jobs.
Having a list of running and waiting jobs
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface DownloadAvailableChaptersJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/interfaces/Jobs/DownloadMangaCoverJob.ts
Normal file
5
Website/modules/interfaces/Jobs/DownloadMangaCoverJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface DownloadMangaCoverJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface DownloadSingleChapterJob extends IJob {
|
||||
chapterId: string;
|
||||
}
|
28
Website/modules/interfaces/Jobs/IJob.ts
Normal file
28
Website/modules/interfaces/Jobs/IJob.ts
Normal file
@ -0,0 +1,28 @@
|
||||
export default interface IJob{
|
||||
jobId: string;
|
||||
parentJobId: string;
|
||||
dependsOnJobIds: string[];
|
||||
jobType: JobType;
|
||||
recurrenceMs: number;
|
||||
lastExecution: Date;
|
||||
nextExecution: Date;
|
||||
state: JobState;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export enum JobType {
|
||||
DownloadSingleChapterJob = "DownloadSingleChapterJob",
|
||||
DownloadAvailableChaptersJob = "DownloadAvailableChaptersJob",
|
||||
UpdateMetaDataJob = "UpdateMetaDataJob",
|
||||
MoveFileOrFolderJob = "MoveFileOrFolderJob",
|
||||
DownloadMangaCoverJob = "DownloadMangaCoverJob",
|
||||
RetrieveChaptersJob = "RetrieveChaptersJob",
|
||||
UpdateFilesDownloadedJob = "UpdateFilesDownloadedJob"
|
||||
}
|
||||
|
||||
export enum JobState {
|
||||
Waiting = "Waiting",
|
||||
Running = "Running",
|
||||
Completed = "Completed",
|
||||
Failed = "Failed"
|
||||
}
|
6
Website/modules/interfaces/Jobs/MoveFileOrFolderJob.ts
Normal file
6
Website/modules/interfaces/Jobs/MoveFileOrFolderJob.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface MoveFileOrFolderJob extends IJob {
|
||||
fromLocation: string;
|
||||
toLocation: string;
|
||||
}
|
5
Website/modules/interfaces/Jobs/RetrieveChaptersJob.ts
Normal file
5
Website/modules/interfaces/Jobs/RetrieveChaptersJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface RetrieveChaptersJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface UpdateFilesDownloadedJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/interfaces/Jobs/UpdateMetadataJob.ts
Normal file
5
Website/modules/interfaces/Jobs/UpdateMetadataJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface UpdateMetadataJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
Reference in New Issue
Block a user