Complete customer transfers on first authenticated inventory
Rust development slice / linux (push) Failing after 8s

This commit is contained in:
2026-11-18 22:57:05 +01:00
parent 65d84a19c0
commit 480e3749a6
13 changed files with 234 additions and 76 deletions
+2
View File
@@ -4,6 +4,8 @@ JOIN LATERAL (
SELECT a.agent_id, a.revoked_at
FROM agent_installations a
WHERE a.tenant_id=asset.tenant_id AND a.asset_id=asset.asset_id AND a.created_at<=$2
AND NOT a.customer_transfer_pending
AND (a.customer_transfer_activated_at IS NULL OR a.customer_transfer_activated_at<=$2)
AND a.last_authenticated_at IS NOT NULL AND a.last_contact_at IS NOT NULL
ORDER BY a.enrollment_generation DESC, a.created_at DESC, a.agent_id
LIMIT 1