You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
510 B
TypeScript
21 lines
510 B
TypeScript
import {Injectable} from "@angular/core";
|
|
import {MediarepoApi} from "../../../api/Api";
|
|
import {JobType} from "../../../api/api-types/job";
|
|
|
|
@Injectable({
|
|
providedIn: "root"
|
|
})
|
|
export class JobService {
|
|
|
|
constructor() {
|
|
}
|
|
|
|
public async runJob(jobType: JobType, sync: boolean = true): Promise<void> {
|
|
return MediarepoApi.runJob({ jobType, sync });
|
|
}
|
|
|
|
public async isJobRunning(jobType: JobType): Promise<boolean> {
|
|
return MediarepoApi.isJobRunning({ jobType });
|
|
}
|
|
}
|