duron 0.3.0-beta.13 → 0.3.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.d.ts +220 -13
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +17 -127
- package/dist/adapters/postgres/base.d.ts +1 -1
- package/dist/adapters/postgres/base.d.ts.map +1 -1
- package/dist/adapters/postgres/base.js +22 -7
- package/dist/adapters/postgres/schema.d.ts +32 -2
- package/dist/adapters/postgres/schema.d.ts.map +1 -1
- package/dist/adapters/postgres/schema.default.d.ts +32 -2
- package/dist/adapters/postgres/schema.default.d.ts.map +1 -1
- package/dist/adapters/postgres/schema.js +5 -1
- package/dist/adapters/schemas.d.ts +17 -0
- package/dist/adapters/schemas.d.ts.map +1 -1
- package/dist/adapters/schemas.js +8 -0
- package/dist/client.d.ts +112 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -64
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -0
- package/migrations/postgres/{20260120154151_mean_magdalene → 20260121160012_normal_bloodstrike}/migration.sql +5 -1
- package/migrations/postgres/{20260120154151_mean_magdalene → 20260121160012_normal_bloodstrike}/snapshot.json +106 -14
- package/package.json +1 -1
- package/src/action.ts +273 -142
- package/src/adapters/postgres/base.ts +31 -5
- package/src/adapters/postgres/schema.ts +5 -1
- package/src/adapters/schemas.ts +8 -0
- package/src/client.ts +90 -26
- package/src/server.ts +2 -0
|
@@ -68,17 +68,19 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
68
68
|
*
|
|
69
69
|
* @returns Promise resolving to the job ID, or `null` if creation failed
|
|
70
70
|
*/
|
|
71
|
-
async _createJob({ queue, groupKey, input, timeoutMs, checksum, concurrencyLimit }) {
|
|
71
|
+
async _createJob({ queue, groupKey, input, timeoutMs, checksum, concurrencyLimit, concurrencyStepLimit, description, }) {
|
|
72
72
|
const [result] = await this.db
|
|
73
73
|
.insert(this.tables.jobsTable)
|
|
74
74
|
.values({
|
|
75
75
|
action_name: queue,
|
|
76
76
|
group_key: groupKey,
|
|
77
|
+
description: description ?? null,
|
|
77
78
|
checksum,
|
|
78
79
|
input,
|
|
79
80
|
status: JOB_STATUS_CREATED,
|
|
80
81
|
timeout_ms: timeoutMs,
|
|
81
82
|
concurrency_limit: concurrencyLimit,
|
|
83
|
+
concurrency_step_limit: concurrencyStepLimit,
|
|
82
84
|
})
|
|
83
85
|
.returning({ id: this.tables.jobsTable.id });
|
|
84
86
|
if (!result) {
|
|
@@ -153,11 +155,13 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
153
155
|
SELECT
|
|
154
156
|
j.action_name,
|
|
155
157
|
j.group_key,
|
|
158
|
+
j.description,
|
|
156
159
|
j.checksum,
|
|
157
160
|
j.input,
|
|
158
161
|
j.timeout_ms,
|
|
159
162
|
j.created_at,
|
|
160
|
-
j.concurrency_limit
|
|
163
|
+
j.concurrency_limit,
|
|
164
|
+
j.concurrency_step_limit
|
|
161
165
|
FROM ${this.tables.jobsTable} j
|
|
162
166
|
WHERE j.id = ${jobId}
|
|
163
167
|
AND j.status IN (${JOB_STATUS_COMPLETED}, ${JOB_STATUS_CANCELLED}, ${JOB_STATUS_FAILED})
|
|
@@ -182,15 +186,18 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
182
186
|
INSERT INTO ${this.tables.jobsTable} (
|
|
183
187
|
action_name,
|
|
184
188
|
group_key,
|
|
189
|
+
description,
|
|
185
190
|
checksum,
|
|
186
191
|
input,
|
|
187
192
|
status,
|
|
188
193
|
timeout_ms,
|
|
189
|
-
concurrency_limit
|
|
194
|
+
concurrency_limit,
|
|
195
|
+
concurrency_step_limit
|
|
190
196
|
)
|
|
191
197
|
SELECT
|
|
192
198
|
ls.action_name,
|
|
193
199
|
ls.group_key,
|
|
200
|
+
ls.description,
|
|
194
201
|
ls.checksum,
|
|
195
202
|
ls.input,
|
|
196
203
|
${JOB_STATUS_CREATED},
|
|
@@ -206,7 +213,8 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
206
213
|
LIMIT 1
|
|
207
214
|
),
|
|
208
215
|
ls.concurrency_limit
|
|
209
|
-
)
|
|
216
|
+
),
|
|
217
|
+
ls.concurrency_step_limit
|
|
210
218
|
FROM locked_source ls
|
|
211
219
|
WHERE NOT EXISTS (SELECT 1 FROM existing_retry)
|
|
212
220
|
RETURNING id
|
|
@@ -540,6 +548,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
540
548
|
j.id,
|
|
541
549
|
j.action_name as "actionName",
|
|
542
550
|
j.group_key as "groupKey",
|
|
551
|
+
j.description,
|
|
543
552
|
j.input,
|
|
544
553
|
j.output,
|
|
545
554
|
j.error,
|
|
@@ -550,7 +559,8 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
550
559
|
j.finished_at as "finishedAt",
|
|
551
560
|
j.created_at as "createdAt",
|
|
552
561
|
j.updated_at as "updatedAt",
|
|
553
|
-
j.concurrency_limit as "concurrencyLimit"
|
|
562
|
+
j.concurrency_limit as "concurrencyLimit",
|
|
563
|
+
j.concurrency_step_limit as "concurrencyStepLimit"
|
|
554
564
|
`));
|
|
555
565
|
return result;
|
|
556
566
|
}
|
|
@@ -834,6 +844,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
834
844
|
id: jobsTable.id,
|
|
835
845
|
actionName: jobsTable.action_name,
|
|
836
846
|
groupKey: jobsTable.group_key,
|
|
847
|
+
description: jobsTable.description,
|
|
837
848
|
input: jobsTable.input,
|
|
838
849
|
output: jobsTable.output,
|
|
839
850
|
error: jobsTable.error,
|
|
@@ -845,6 +856,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
845
856
|
createdAt: jobsTable.created_at,
|
|
846
857
|
updatedAt: jobsTable.updated_at,
|
|
847
858
|
concurrencyLimit: jobsTable.concurrency_limit,
|
|
859
|
+
concurrencyStepLimit: jobsTable.concurrency_step_limit,
|
|
848
860
|
clientId: jobsTable.client_id,
|
|
849
861
|
durationMs,
|
|
850
862
|
})
|
|
@@ -912,7 +924,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
912
924
|
? ilike(jobsTable.group_key, `%${filters.groupKey}%`)
|
|
913
925
|
: undefined, filters.clientId
|
|
914
926
|
? inArray(jobsTable.client_id, Array.isArray(filters.clientId) ? filters.clientId : [filters.clientId])
|
|
915
|
-
: undefined, filters.createdAt && Array.isArray(filters.createdAt)
|
|
927
|
+
: undefined, filters.description ? ilike(jobsTable.description, `%${filters.description}%`) : undefined, filters.createdAt && Array.isArray(filters.createdAt)
|
|
916
928
|
? between(sql `date_trunc('second', ${jobsTable.created_at})`, filters.createdAt[0].toISOString(), filters.createdAt[1].toISOString())
|
|
917
929
|
: undefined, filters.createdAt && !Array.isArray(filters.createdAt)
|
|
918
930
|
? gte(sql `date_trunc('second', ${jobsTable.created_at})`, filters.createdAt.toISOString())
|
|
@@ -927,7 +939,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
927
939
|
: undefined, filters.updatedAfter
|
|
928
940
|
? sql `date_trunc('milliseconds', ${jobsTable.updated_at}) > ${filters.updatedAfter.toISOString()}::timestamptz`
|
|
929
941
|
: undefined, fuzzySearch && fuzzySearch.length > 0
|
|
930
|
-
? or(ilike(jobsTable.action_name, `%${fuzzySearch}%`), ilike(jobsTable.group_key, `%${fuzzySearch}%`), ilike(jobsTable.client_id, `%${fuzzySearch}%`), sql `${jobsTable.id}::text ilike ${`%${fuzzySearch}%`}`, sql `to_tsvector('english', ${jobsTable.input}::text) @@ plainto_tsquery('english', ${fuzzySearch})`, sql `to_tsvector('english', ${jobsTable.output}::text) @@ plainto_tsquery('english', ${fuzzySearch})`)
|
|
942
|
+
? or(ilike(jobsTable.action_name, `%${fuzzySearch}%`), ilike(jobsTable.group_key, `%${fuzzySearch}%`), ilike(jobsTable.description, `%${fuzzySearch}%`), ilike(jobsTable.client_id, `%${fuzzySearch}%`), sql `${jobsTable.id}::text ilike ${`%${fuzzySearch}%`}`, sql `to_tsvector('english', ${jobsTable.input}::text) @@ plainto_tsquery('english', ${fuzzySearch})`, sql `to_tsvector('english', ${jobsTable.output}::text) @@ plainto_tsquery('english', ${fuzzySearch})`)
|
|
931
943
|
: undefined, ...(filters.inputFilter && Object.keys(filters.inputFilter).length > 0
|
|
932
944
|
? this.#buildJsonbWhereConditions(filters.inputFilter, jobsTable.input)
|
|
933
945
|
: []), ...(filters.outputFilter && Object.keys(filters.outputFilter).length > 0
|
|
@@ -972,12 +984,14 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
972
984
|
actionName: jobsTable.action_name,
|
|
973
985
|
expiresAt: jobsTable.expires_at,
|
|
974
986
|
duration: durationMs,
|
|
987
|
+
description: jobsTable.description,
|
|
975
988
|
};
|
|
976
989
|
const jobs = await this.db
|
|
977
990
|
.select({
|
|
978
991
|
id: jobsTable.id,
|
|
979
992
|
actionName: jobsTable.action_name,
|
|
980
993
|
groupKey: jobsTable.group_key,
|
|
994
|
+
description: jobsTable.description,
|
|
981
995
|
input: jobsTable.input,
|
|
982
996
|
output: jobsTable.output,
|
|
983
997
|
error: jobsTable.error,
|
|
@@ -989,6 +1003,7 @@ export class PostgresBaseAdapter extends Adapter {
|
|
|
989
1003
|
createdAt: jobsTable.created_at,
|
|
990
1004
|
updatedAt: jobsTable.updated_at,
|
|
991
1005
|
concurrencyLimit: jobsTable.concurrency_limit,
|
|
1006
|
+
concurrencyStepLimit: jobsTable.concurrency_step_limit,
|
|
992
1007
|
clientId: jobsTable.client_id,
|
|
993
1008
|
durationMs,
|
|
994
1009
|
})
|
|
@@ -50,6 +50,21 @@ export default function createSchema(schemaName: string): {
|
|
|
50
50
|
identity: undefined;
|
|
51
51
|
generated: undefined;
|
|
52
52
|
}>;
|
|
53
|
+
description: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, {
|
|
54
|
+
name: string;
|
|
55
|
+
tableName: "jobs";
|
|
56
|
+
dataType: "string";
|
|
57
|
+
data: string;
|
|
58
|
+
driverParam: string;
|
|
59
|
+
notNull: false;
|
|
60
|
+
hasDefault: false;
|
|
61
|
+
isPrimaryKey: false;
|
|
62
|
+
isAutoincrement: false;
|
|
63
|
+
hasRuntimeDefault: false;
|
|
64
|
+
enumValues: undefined;
|
|
65
|
+
identity: undefined;
|
|
66
|
+
generated: undefined;
|
|
67
|
+
}>;
|
|
53
68
|
status: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, "created" | "active" | "completed" | "failed" | "cancelled">>>, {
|
|
54
69
|
name: string;
|
|
55
70
|
tableName: "jobs";
|
|
@@ -200,14 +215,29 @@ export default function createSchema(schemaName: string): {
|
|
|
200
215
|
identity: undefined;
|
|
201
216
|
generated: undefined;
|
|
202
217
|
}>;
|
|
203
|
-
concurrency_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").
|
|
218
|
+
concurrency_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgIntegerBuilder>, {
|
|
204
219
|
name: string;
|
|
205
220
|
tableName: "jobs";
|
|
206
221
|
dataType: "number int32";
|
|
207
222
|
data: number;
|
|
208
223
|
driverParam: string | number;
|
|
209
224
|
notNull: true;
|
|
210
|
-
hasDefault:
|
|
225
|
+
hasDefault: false;
|
|
226
|
+
isPrimaryKey: false;
|
|
227
|
+
isAutoincrement: false;
|
|
228
|
+
hasRuntimeDefault: false;
|
|
229
|
+
enumValues: undefined;
|
|
230
|
+
identity: undefined;
|
|
231
|
+
generated: undefined;
|
|
232
|
+
}>;
|
|
233
|
+
concurrency_step_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgIntegerBuilder>, {
|
|
234
|
+
name: string;
|
|
235
|
+
tableName: "jobs";
|
|
236
|
+
dataType: "number int32";
|
|
237
|
+
data: number;
|
|
238
|
+
driverParam: string | number;
|
|
239
|
+
notNull: true;
|
|
240
|
+
hasDefault: false;
|
|
211
241
|
isPrimaryKey: false;
|
|
212
242
|
isAutoincrement: false;
|
|
213
243
|
hasRuntimeDefault: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/adapters/postgres/schema.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,UAAU,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/adapters/postgres/schema.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAgFb,IAAI;uBAAS,iBAAiB;2BAAa,MAAM;;;;;;8BAAjD,IAAI;2BAAS,iBAAiB;+BAAa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmE9D,MAAM;8BAAgB,MAAM;6BAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;0BAA9D,MAAM;kCAAgB,MAAM;iCAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;EA+B1F"}
|
|
@@ -47,6 +47,21 @@ declare const schema: import("drizzle-orm/pg-core").PgSchema<string>, jobsTable:
|
|
|
47
47
|
identity: undefined;
|
|
48
48
|
generated: undefined;
|
|
49
49
|
}>;
|
|
50
|
+
description: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, {
|
|
51
|
+
name: string;
|
|
52
|
+
tableName: "jobs";
|
|
53
|
+
dataType: "string";
|
|
54
|
+
data: string;
|
|
55
|
+
driverParam: string;
|
|
56
|
+
notNull: false;
|
|
57
|
+
hasDefault: false;
|
|
58
|
+
isPrimaryKey: false;
|
|
59
|
+
isAutoincrement: false;
|
|
60
|
+
hasRuntimeDefault: false;
|
|
61
|
+
enumValues: undefined;
|
|
62
|
+
identity: undefined;
|
|
63
|
+
generated: undefined;
|
|
64
|
+
}>;
|
|
50
65
|
status: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, "created" | "active" | "completed" | "failed" | "cancelled">>>, {
|
|
51
66
|
name: string;
|
|
52
67
|
tableName: "jobs";
|
|
@@ -197,14 +212,29 @@ declare const schema: import("drizzle-orm/pg-core").PgSchema<string>, jobsTable:
|
|
|
197
212
|
identity: undefined;
|
|
198
213
|
generated: undefined;
|
|
199
214
|
}>;
|
|
200
|
-
concurrency_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").
|
|
215
|
+
concurrency_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgIntegerBuilder>, {
|
|
201
216
|
name: string;
|
|
202
217
|
tableName: "jobs";
|
|
203
218
|
dataType: "number int32";
|
|
204
219
|
data: number;
|
|
205
220
|
driverParam: string | number;
|
|
206
221
|
notNull: true;
|
|
207
|
-
hasDefault:
|
|
222
|
+
hasDefault: false;
|
|
223
|
+
isPrimaryKey: false;
|
|
224
|
+
isAutoincrement: false;
|
|
225
|
+
hasRuntimeDefault: false;
|
|
226
|
+
enumValues: undefined;
|
|
227
|
+
identity: undefined;
|
|
228
|
+
generated: undefined;
|
|
229
|
+
}>;
|
|
230
|
+
concurrency_step_limit: import("drizzle-orm/pg-core").PgBuildColumn<"jobs", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgIntegerBuilder>, {
|
|
231
|
+
name: string;
|
|
232
|
+
tableName: "jobs";
|
|
233
|
+
dataType: "number int32";
|
|
234
|
+
data: number;
|
|
235
|
+
driverParam: string | number;
|
|
236
|
+
notNull: true;
|
|
237
|
+
hasDefault: false;
|
|
208
238
|
isPrimaryKey: false;
|
|
209
239
|
isAutoincrement: false;
|
|
210
240
|
hasRuntimeDefault: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.default.d.ts","sourceRoot":"","sources":["../../../src/adapters/postgres/schema.default.ts"],"names":[],"mappings":"AAEA,QAAA,MAAQ,MAAM,kDAAE,SAAS
|
|
1
|
+
{"version":3,"file":"schema.default.d.ts","sourceRoot":"","sources":["../../../src/adapters/postgres/schema.default.ts"],"names":[],"mappings":"AAEA,QAAA,MAAQ,MAAM,kDAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0B,CAAA;AAE9E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -7,6 +7,7 @@ export default function createSchema(schemaName) {
|
|
|
7
7
|
id: uuid('id').primaryKey().defaultRandom(),
|
|
8
8
|
action_name: text('action_name').notNull(),
|
|
9
9
|
group_key: text('group_key').notNull(),
|
|
10
|
+
description: text('description'),
|
|
10
11
|
status: text('status').$type().notNull().default('created'),
|
|
11
12
|
checksum: text('checksum').notNull(),
|
|
12
13
|
input: jsonb('input').notNull().default({}),
|
|
@@ -17,7 +18,8 @@ export default function createSchema(schemaName) {
|
|
|
17
18
|
started_at: timestamp('started_at', { withTimezone: true }),
|
|
18
19
|
finished_at: timestamp('finished_at', { withTimezone: true }),
|
|
19
20
|
client_id: text('client_id'),
|
|
20
|
-
concurrency_limit: integer('concurrency_limit').notNull()
|
|
21
|
+
concurrency_limit: integer('concurrency_limit').notNull(),
|
|
22
|
+
concurrency_step_limit: integer('concurrency_step_limit').notNull(),
|
|
21
23
|
created_at: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
|
|
22
24
|
updated_at: timestamp('updated_at', { withTimezone: true })
|
|
23
25
|
.notNull()
|
|
@@ -30,12 +32,14 @@ export default function createSchema(schemaName) {
|
|
|
30
32
|
index('idx_jobs_action_name').on(table.action_name),
|
|
31
33
|
index('idx_jobs_status').on(table.status),
|
|
32
34
|
index('idx_jobs_group_key').on(table.group_key),
|
|
35
|
+
index('idx_jobs_description').on(table.description),
|
|
33
36
|
index('idx_jobs_started_at').on(table.started_at),
|
|
34
37
|
index('idx_jobs_finished_at').on(table.finished_at),
|
|
35
38
|
index('idx_jobs_expires_at').on(table.expires_at),
|
|
36
39
|
index('idx_jobs_client_id').on(table.client_id),
|
|
37
40
|
index('idx_jobs_checksum').on(table.checksum),
|
|
38
41
|
index('idx_jobs_concurrency_limit').on(table.concurrency_limit),
|
|
42
|
+
index('idx_jobs_concurrency_step_limit').on(table.concurrency_step_limit),
|
|
39
43
|
// Composite indexes
|
|
40
44
|
index('idx_jobs_action_status').on(table.action_name, table.status),
|
|
41
45
|
index('idx_jobs_action_group').on(table.action_name, table.group_key),
|
|
@@ -22,6 +22,7 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
22
22
|
id: z.ZodString;
|
|
23
23
|
actionName: z.ZodString;
|
|
24
24
|
groupKey: z.ZodString;
|
|
25
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
25
26
|
input: z.ZodAny;
|
|
26
27
|
output: z.ZodNullable<z.ZodAny>;
|
|
27
28
|
error: z.ZodNullable<z.ZodAny>;
|
|
@@ -39,6 +40,7 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
39
40
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
40
41
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
41
42
|
concurrencyLimit: z.ZodCoercedNumber<unknown>;
|
|
43
|
+
concurrencyStepLimit: z.ZodCoercedNumber<unknown>;
|
|
42
44
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
45
|
durationMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
44
46
|
}, z.core.$strip>;
|
|
@@ -117,6 +119,7 @@ export declare const JobSortFieldSchema: z.ZodEnum<{
|
|
|
117
119
|
status: "status";
|
|
118
120
|
createdAt: "createdAt";
|
|
119
121
|
actionName: "actionName";
|
|
122
|
+
description: "description";
|
|
120
123
|
expiresAt: "expiresAt";
|
|
121
124
|
startedAt: "startedAt";
|
|
122
125
|
finishedAt: "finishedAt";
|
|
@@ -127,6 +130,7 @@ export declare const JobSortSchema: z.ZodObject<{
|
|
|
127
130
|
status: "status";
|
|
128
131
|
createdAt: "createdAt";
|
|
129
132
|
actionName: "actionName";
|
|
133
|
+
description: "description";
|
|
130
134
|
expiresAt: "expiresAt";
|
|
131
135
|
startedAt: "startedAt";
|
|
132
136
|
finishedAt: "finishedAt";
|
|
@@ -154,6 +158,7 @@ export declare const JobFiltersSchema: z.ZodObject<{
|
|
|
154
158
|
actionName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
155
159
|
groupKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
156
160
|
clientId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
161
|
+
description: z.ZodOptional<z.ZodString>;
|
|
157
162
|
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
158
163
|
startedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
159
164
|
finishedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
@@ -182,6 +187,7 @@ export declare const GetJobsOptionsSchema: z.ZodObject<{
|
|
|
182
187
|
actionName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
183
188
|
groupKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
184
189
|
clientId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
190
|
+
description: z.ZodOptional<z.ZodString>;
|
|
185
191
|
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
186
192
|
startedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
187
193
|
finishedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
@@ -195,6 +201,7 @@ export declare const GetJobsOptionsSchema: z.ZodObject<{
|
|
|
195
201
|
status: "status";
|
|
196
202
|
createdAt: "createdAt";
|
|
197
203
|
actionName: "actionName";
|
|
204
|
+
description: "description";
|
|
198
205
|
expiresAt: "expiresAt";
|
|
199
206
|
startedAt: "startedAt";
|
|
200
207
|
finishedAt: "finishedAt";
|
|
@@ -209,6 +216,7 @@ export declare const GetJobsOptionsSchema: z.ZodObject<{
|
|
|
209
216
|
status: "status";
|
|
210
217
|
createdAt: "createdAt";
|
|
211
218
|
actionName: "actionName";
|
|
219
|
+
description: "description";
|
|
212
220
|
expiresAt: "expiresAt";
|
|
213
221
|
startedAt: "startedAt";
|
|
214
222
|
finishedAt: "finishedAt";
|
|
@@ -232,6 +240,8 @@ export declare const CreateJobOptionsSchema: z.ZodObject<{
|
|
|
232
240
|
input: z.ZodAny;
|
|
233
241
|
timeoutMs: z.ZodNumber;
|
|
234
242
|
concurrencyLimit: z.ZodNumber;
|
|
243
|
+
concurrencyStepLimit: z.ZodNumber;
|
|
244
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
235
245
|
}, z.core.$strip>;
|
|
236
246
|
export declare const RecoverJobsOptionsSchema: z.ZodObject<{
|
|
237
247
|
checksums: z.ZodArray<z.ZodString>;
|
|
@@ -278,6 +288,7 @@ export declare const DeleteJobsOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
278
288
|
actionName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
279
289
|
groupKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
280
290
|
clientId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
291
|
+
description: z.ZodOptional<z.ZodString>;
|
|
281
292
|
createdAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
282
293
|
startedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
283
294
|
finishedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>]>>;
|
|
@@ -291,6 +302,7 @@ export declare const DeleteJobsOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
291
302
|
status: "status";
|
|
292
303
|
createdAt: "createdAt";
|
|
293
304
|
actionName: "actionName";
|
|
305
|
+
description: "description";
|
|
294
306
|
expiresAt: "expiresAt";
|
|
295
307
|
startedAt: "startedAt";
|
|
296
308
|
finishedAt: "finishedAt";
|
|
@@ -305,6 +317,7 @@ export declare const DeleteJobsOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
305
317
|
status: "status";
|
|
306
318
|
createdAt: "createdAt";
|
|
307
319
|
actionName: "actionName";
|
|
320
|
+
description: "description";
|
|
308
321
|
expiresAt: "expiresAt";
|
|
309
322
|
startedAt: "startedAt";
|
|
310
323
|
finishedAt: "finishedAt";
|
|
@@ -366,6 +379,7 @@ export declare const JobsArrayResultSchema: z.ZodArray<z.ZodObject<{
|
|
|
366
379
|
id: z.ZodString;
|
|
367
380
|
actionName: z.ZodString;
|
|
368
381
|
groupKey: z.ZodString;
|
|
382
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
369
383
|
input: z.ZodAny;
|
|
370
384
|
output: z.ZodNullable<z.ZodAny>;
|
|
371
385
|
error: z.ZodNullable<z.ZodAny>;
|
|
@@ -383,6 +397,7 @@ export declare const JobsArrayResultSchema: z.ZodArray<z.ZodObject<{
|
|
|
383
397
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
384
398
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
385
399
|
concurrencyLimit: z.ZodCoercedNumber<unknown>;
|
|
400
|
+
concurrencyStepLimit: z.ZodCoercedNumber<unknown>;
|
|
386
401
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
387
402
|
durationMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
388
403
|
}, z.core.$strip>>;
|
|
@@ -406,6 +421,7 @@ export declare const GetJobsResultSchema: z.ZodObject<{
|
|
|
406
421
|
id: z.ZodString;
|
|
407
422
|
actionName: z.ZodString;
|
|
408
423
|
groupKey: z.ZodString;
|
|
424
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
409
425
|
input: z.ZodAny;
|
|
410
426
|
output: z.ZodNullable<z.ZodAny>;
|
|
411
427
|
error: z.ZodNullable<z.ZodAny>;
|
|
@@ -423,6 +439,7 @@ export declare const GetJobsResultSchema: z.ZodObject<{
|
|
|
423
439
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
424
440
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
425
441
|
concurrencyLimit: z.ZodCoercedNumber<unknown>;
|
|
442
|
+
concurrencyStepLimit: z.ZodCoercedNumber<unknown>;
|
|
426
443
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
444
|
durationMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
428
445
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/adapters/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,eAAe;;;;;;EAAuB,CAAA;AACnD,eAAO,MAAM,gBAAgB;;;;;EAAwB,CAAA;AAYrD,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAMF,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/adapters/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,eAAe;;;;;;EAAuB,CAAA;AACnD,eAAO,MAAM,gBAAgB;;;;;EAAwB,CAAA;AAYrD,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAMF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBpB,CAAA;AAMF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBxB,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;i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M,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AACrD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAC7C,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AACrD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
package/dist/adapters/schemas.js
CHANGED
|
@@ -26,6 +26,7 @@ export const JobSchema = z.object({
|
|
|
26
26
|
id: z.string(),
|
|
27
27
|
actionName: z.string(),
|
|
28
28
|
groupKey: z.string(),
|
|
29
|
+
description: z.string().nullable().default(null),
|
|
29
30
|
input: z.any(),
|
|
30
31
|
output: z.any().nullable(),
|
|
31
32
|
error: z.any().nullable(),
|
|
@@ -37,6 +38,7 @@ export const JobSchema = z.object({
|
|
|
37
38
|
createdAt: DateSchema,
|
|
38
39
|
updatedAt: DateSchema,
|
|
39
40
|
concurrencyLimit: z.coerce.number(),
|
|
41
|
+
concurrencyStepLimit: z.coerce.number(),
|
|
40
42
|
clientId: z.string().nullable().optional(),
|
|
41
43
|
/** Duration in milliseconds (finishedAt - startedAt). Null if job hasn't finished. */
|
|
42
44
|
durationMs: z.coerce.number().nullable().default(null),
|
|
@@ -78,6 +80,7 @@ export const JobSortFieldSchema = z.enum([
|
|
|
78
80
|
'actionName',
|
|
79
81
|
'expiresAt',
|
|
80
82
|
'duration',
|
|
83
|
+
'description',
|
|
81
84
|
]);
|
|
82
85
|
export const JobSortSchema = z.object({
|
|
83
86
|
field: JobSortFieldSchema,
|
|
@@ -88,6 +91,7 @@ export const JobFiltersSchema = z.object({
|
|
|
88
91
|
actionName: z.union([z.string(), z.array(z.string())]).optional(),
|
|
89
92
|
groupKey: z.union([z.string(), z.array(z.string())]).optional(),
|
|
90
93
|
clientId: z.union([z.string(), z.array(z.string())]).optional(),
|
|
94
|
+
description: z.string().optional(),
|
|
91
95
|
createdAt: z.union([DateSchema, z.array(DateSchema).length(2)]).optional(),
|
|
92
96
|
startedAt: z.union([DateSchema, z.array(DateSchema).length(2)]).optional(),
|
|
93
97
|
finishedAt: z.union([DateSchema, z.array(DateSchema).length(2)]).optional(),
|
|
@@ -123,6 +127,10 @@ export const CreateJobOptionsSchema = z.object({
|
|
|
123
127
|
timeoutMs: z.number(),
|
|
124
128
|
/** The concurrency limit for this job's group */
|
|
125
129
|
concurrencyLimit: z.number(),
|
|
130
|
+
/** The concurrency limit for steps within this job */
|
|
131
|
+
concurrencyStepLimit: z.number(),
|
|
132
|
+
/** Optional description for the job */
|
|
133
|
+
description: z.string().nullable().optional(),
|
|
126
134
|
});
|
|
127
135
|
export const RecoverJobsOptionsSchema = z.object({
|
|
128
136
|
/** The action checksums to recover jobs for */
|