mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
feat: add scheduler (#30)
This commit is contained in:
@@ -4,6 +4,7 @@ import { ArtifactRepo } from './artifacts/artifacts.js';
|
||||
import { LoadRepo } from './loads/loads.js';
|
||||
import { LogRepo } from './logs/logs.js';
|
||||
import { RunRepo } from './runs/runs.js';
|
||||
import { ScheduleRepo } from './schedules/schedules.js';
|
||||
import { SecretRepo } from './secrets/secrets.js';
|
||||
|
||||
type ReposOptions = {
|
||||
@@ -17,6 +18,7 @@ class Repos {
|
||||
#logs: LogRepo;
|
||||
#artifacts: ArtifactRepo;
|
||||
#secrets: SecretRepo;
|
||||
#schedule: ScheduleRepo;
|
||||
|
||||
constructor({ database, config }: ReposOptions) {
|
||||
this.#loads = new LoadRepo({
|
||||
@@ -36,6 +38,9 @@ class Repos {
|
||||
this.#secrets = new SecretRepo({
|
||||
database,
|
||||
});
|
||||
this.#schedule = new ScheduleRepo({
|
||||
database,
|
||||
});
|
||||
}
|
||||
|
||||
public get loads() {
|
||||
@@ -57,8 +62,13 @@ class Repos {
|
||||
public get secrets() {
|
||||
return this.#secrets;
|
||||
}
|
||||
|
||||
public get schedules() {
|
||||
return this.#schedule;
|
||||
}
|
||||
}
|
||||
|
||||
export { findSchedulesSchema, addScheduleSchema } from './schedules/schedules.js';
|
||||
export { findLogsSchema, addLogSchema } from './logs/logs.js';
|
||||
export { setLoadSchema, findLoadsSchema } from './loads/loads.js';
|
||||
export { createRunSchema, findRunsSchema } from './runs/runs.js';
|
||||
|
||||
Reference in New Issue
Block a user