Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.6 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "\n                        WITH removed AS (\n                            DELETE FROM harness_runtime_connection\n                            WHERE harness_id = $1 AND (id = $2 OR lease_expires_at <= now())\n                            RETURNING id, connected_at\n                        ), others AS (\n                            SELECT count(*) AS live\n                            FROM harness_runtime_connection\n                            WHERE harness_id = $1 AND id <> $2 AND lease_expires_at > now()\n                        ), stamped AS (\n                            UPDATE harnesses SET last_disconnected_at = now()\n                            WHERE id = $1 AND (SELECT live FROM others) = 0\n                        )\n                        SELECT\n                            (SELECT live FROM others) AS \"other_live_connections!\",\n                            (\n                                SELECT (extract(epoch FROM now() - connected_at) * 1000)::bigint\n                                FROM removed\n                                WHERE id = $2\n                            ) AS connected_for_ms\n                        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "other_live_connections!",
        "type_info": "Int8"
      },
      {
        "ordinal": 1,
        "name": "connected_for_ms",
        "type_info": "Int8"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Uuid"
      ]
    },
    "nullable": [
      null,
      null
    ]
  },
  "hash": "65324cc6bff4a47702524a0ffc2b2e12acbd283bb0e90732e64cb74ad430ebcb"
}