From 8404063ea156cab6320c6d808f825e7c935f9d5a Mon Sep 17 00:00:00 2001 From: ingalls Date: Tue, 3 Sep 2024 16:27:06 -0600 Subject: [PATCH] Add layer.ephemeral --- api/lib/models/Layer.ts | 2 ++ api/lib/schema.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/api/lib/models/Layer.ts b/api/lib/models/Layer.ts index 076434919..ed91a5dc2 100644 --- a/api/lib/models/Layer.ts +++ b/api/lib/models/Layer.ts @@ -28,6 +28,7 @@ export const AugmentedLayer = Type.Object({ connection: Type.Optional(Type.Integer()), cron: Type.String(), environment: Type.Any(), + ephemeral: Type.Record(Type.String(), Type.String()), config: Layer_Config, memory: Type.Integer(), timeout: Type.Integer(), @@ -69,6 +70,7 @@ export default class LayerModel extends Modeler { connection: Layer.connection, cron: Layer.cron, environment: Layer.environment, + ephemeral: Layer.ephemeral, config: Layer.config, memory: Layer.memory, timeout: Layer.timeout, diff --git a/api/lib/schema.ts b/api/lib/schema.ts index 88b2507c3..fd402fff9 100644 --- a/api/lib/schema.ts +++ b/api/lib/schema.ts @@ -209,6 +209,7 @@ export const Layer = pgTable('layers', { connection: integer('connection').notNull().references(() => Connection.id), cron: text('cron').notNull(), environment: json('environment').notNull().default({}), + ephemeral: json('ephemeral').$type>().notNull().default({}), config: json('config').$type>().notNull().default({}), memory: integer('memory').notNull().default(128), timeout: integer('timeout').notNull().default(128),