T-7: M0.3a — Harden dev Mongo safety: env-safety throws on unsafe data-pipeline QA reads, scheduled jobs default off, read-only bypass tests
This commit is contained in:
parent
d9a9dd23dd
commit
7cf940afce
14 changed files with 407 additions and 26 deletions
|
|
@ -21,7 +21,7 @@ export const queueConfigSchema = z.object({
|
|||
enabled: z.boolean().optional().default(true),
|
||||
workers: z.number().optional().default(1),
|
||||
concurrency: z.number().optional().default(1),
|
||||
enableScheduledJobs: z.boolean().optional().default(true),
|
||||
enableScheduledJobs: z.boolean().optional().default(false),
|
||||
defaultJobOptions: z
|
||||
.object({
|
||||
attempts: z.number().default(3),
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ export class ServiceContainerBuilder {
|
|||
enabled: true,
|
||||
workers: 1,
|
||||
concurrency: 1,
|
||||
enableScheduledJobs: true,
|
||||
enableScheduledJobs: false,
|
||||
defaultJobOptions: {
|
||||
attempts: 3,
|
||||
backoff: { type: 'exponential' as const, delay: 1000 },
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ export class ServiceApplication {
|
|||
|
||||
// Initialize scheduled jobs if enabled in both serviceConfig and runtime queue config
|
||||
const scheduledJobsEnabled =
|
||||
this.serviceConfig.enableScheduledJobs && (this.config.queue?.enableScheduledJobs ?? true);
|
||||
this.serviceConfig.enableScheduledJobs && (this.config.queue?.enableScheduledJobs ?? false);
|
||||
if (scheduledJobsEnabled) {
|
||||
await this.initializeScheduledJobs();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue