bump sandbox; bin/user-activity

This commit is contained in:
2026-04-28 20:09:23 -04:00
parent b4e99744d8
commit 43aeba0b25
2 changed files with 22 additions and 1 deletions

21
bin/user-activity Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
CONTEXT=${KUBECTL_CONTEXT:-prod}
kubectl --context "$CONTEXT" exec -n ai postgres-0 -- psql -U postgres -d iceberg -t -A -F $'\t' -c "
SELECT u.name,
MAX(s.\"createdAt\") as last_login,
MAX(s.\"updatedAt\") as last_active
FROM \"user\" u
LEFT JOIN session s ON s.\"userId\" = u.id
GROUP BY u.name
ORDER BY last_active DESC NULLS LAST;" 2>/dev/null \
| awk -F'\t' '
BEGIN {
fmt = "%-16s %-24s %-24s\n"
printf fmt, "Name", "Last Login", "Last Active"
printf fmt, "----------------", "------------------------", "------------------------"
}
{
printf fmt, $1, $2, $3
}'

View File

@@ -26,7 +26,7 @@ data:
namespace: sandbox
service_namespace: ai
in_cluster: true
sandbox_image: git.dxod.org/dexorder/dexorder/ai-sandbox:2fded95b
sandbox_image: git.dxod.org/dexorder/dexorder/ai-sandbox:b4e99744
sidecar_image: git.dxod.org/dexorder/dexorder/ai-lifecycle-sidecar:latest
image_pull_policy: Always
storage_class: ceph-block