Каркас monorepo: scheduler, data_collector, khbuild_assistant_prep, khb_common; миграции; CI/CD
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
21
packages/data_collector/src/settings.ts
Normal file
21
packages/data_collector/src/settings.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const httpSchema = z.object({ host: z.string().default("127.0.0.1"), port: z.number(), token: z.string().min(1) });
|
||||
|
||||
export const dataCollectorSchema = z.object({
|
||||
http: httpSchema,
|
||||
sources: z.array(z.string()).default(["jobtread"]),
|
||||
mirror: z.object({ maxSnapshotAgeMinutes: z.number().default(90) }).default({}),
|
||||
retention: z
|
||||
.object({
|
||||
hourlyKeepHours: z.number().optional(),
|
||||
dailyKeepDays: z.number().optional(),
|
||||
dbSizeLimitGb: z.number().optional(),
|
||||
reducedDaysSteps: z.array(z.number()).optional(),
|
||||
failedKeepDays: z.number().optional(),
|
||||
failedMaxPerDay: z.number().optional(),
|
||||
})
|
||||
.default({}),
|
||||
holidays: z.object({ country: z.string().default("US"), state: z.string().default("FL"), yearsAhead: z.number().default(2) }).default({}),
|
||||
});
|
||||
export type DataCollectorSettings = z.infer<typeof dataCollectorSchema>;
|
||||
Reference in New Issue
Block a user