@automagik/omni 2.260916.2 → 2.260916.3

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.
@@ -0,0 +1,15 @@
1
+ -- Queue wait on automation_logs (issue #1206).
2
+ --
3
+ -- The engine already measured how long a run waited for a concurrency slot
4
+ -- (#1181) but only wrote it to the process log, so the API returned no value
5
+ -- and "never queued" was indistinguishable from "not recorded":
6
+ --
7
+ -- automation_logs.queue_wait_ms integer, 0 = ran immediately,
8
+ -- NULL = row written before this column.
9
+ --
10
+ -- Hand-written following the 0043/0044/0052 precedent (additive, idempotent).
11
+ -- No explicit BEGIN/COMMIT — the boot migrator executes this file on a pooled
12
+ -- postgres-js connection, which rejects raw transaction control.
13
+
14
+ ALTER TABLE "automation_logs"
15
+ ADD COLUMN IF NOT EXISTS "queue_wait_ms" integer;
@@ -526,6 +526,13 @@
526
526
  "when": 1787400000000,
527
527
  "tag": "0074_trigger_logs_cost",
528
528
  "breakpoints": true
529
+ },
530
+ {
531
+ "idx": 75,
532
+ "version": "7",
533
+ "when": 1787500000000,
534
+ "tag": "0075_automation_logs_queue_wait",
535
+ "breakpoints": true
529
536
  }
530
537
  ]
531
538
  }
package/dist/index.js CHANGED
@@ -42146,7 +42146,8 @@ class AutomationEngine {
42146
42146
  conditionsMatched: result.conditionsMatched,
42147
42147
  actionsExecuted: result.actionsExecuted,
42148
42148
  error: result.error,
42149
- executionTimeMs: result.executionTimeMs
42149
+ executionTimeMs: result.executionTimeMs,
42150
+ queueWaitMs
42150
42151
  }, trustedTenantId);
42151
42152
  }
42152
42153
  logger4.info("Automation executed", {
@@ -83369,6 +83370,7 @@ var init_schema2 = __esm(() => {
83369
83370
  actionsExecuted: jsonb("actions_executed").$type(),
83370
83371
  error: text("error"),
83371
83372
  executionTimeMs: integer("execution_time_ms"),
83373
+ queueWaitMs: integer("queue_wait_ms"),
83372
83374
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
83373
83375
  tenantId: uuid("tenant_id").references(() => tenants.id, { onDelete: "restrict" })
83374
83376
  }, (table3) => ({
@@ -137418,7 +137420,7 @@ import { fileURLToPath } from "url";
137418
137420
  // package.json
137419
137421
  var package_default = {
137420
137422
  name: "@automagik/omni",
137421
- version: "2.260916.2",
137423
+ version: "2.260916.3",
137422
137424
  repository: {
137423
137425
  type: "git",
137424
137426
  url: "git+https://github.com/automagik-dev/omni.git",
@@ -39020,7 +39020,8 @@ class AutomationEngine {
39020
39020
  conditionsMatched: result.conditionsMatched,
39021
39021
  actionsExecuted: result.actionsExecuted,
39022
39022
  error: result.error,
39023
- executionTimeMs: result.executionTimeMs
39023
+ executionTimeMs: result.executionTimeMs,
39024
+ queueWaitMs
39024
39025
  }, trustedTenantId);
39025
39026
  }
39026
39027
  logger4.info("Automation executed", {
@@ -173854,6 +173855,7 @@ var init_schema2 = __esm(() => {
173854
173855
  actionsExecuted: jsonb("actions_executed").$type(),
173855
173856
  error: text("error"),
173856
173857
  executionTimeMs: integer("execution_time_ms"),
173858
+ queueWaitMs: integer("queue_wait_ms"),
173857
173859
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
173858
173860
  tenantId: uuid("tenant_id").references(() => tenants.id, { onDelete: "restrict" })
173859
173861
  }, (table3) => ({
@@ -251109,7 +251111,7 @@ var init_sentry_scrub = __esm(() => {
251109
251111
  var require_package7 = __commonJS((exports, module) => {
251110
251112
  module.exports = {
251111
251113
  name: "@omni/api",
251112
- version: "2.260916.2",
251114
+ version: "2.260916.3",
251113
251115
  private: true,
251114
251116
  type: "module",
251115
251117
  exports: {
@@ -379581,7 +379583,8 @@ var init_automations3 = __esm(() => {
379581
379583
  status: exports_external.enum(["success", "failed", "skipped"]).openapi({ description: "Execution status" }),
379582
379584
  error: exports_external.string().nullable().openapi({ description: "Error message" }),
379583
379585
  executedAt: exports_external.string().datetime().openapi({ description: "Execution timestamp" }),
379584
- durationMs: exports_external.number().int().openapi({ description: "Duration (ms)" })
379586
+ durationMs: exports_external.number().int().openapi({ description: "Duration (ms)" }),
379587
+ queueWaitMs: exports_external.number().int().nullable().openapi({ description: "Time waited for a concurrency slot (ms); 0 = ran immediately, null = not recorded" })
379585
379588
  });
379586
379589
  TestAutomationSchema = exports_external.object({
379587
379590
  event: exports_external.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260916.2",
3
+ "version": "2.260916.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/automagik-dev/omni.git",