curl --request GET \
--url http://localhost:8090/internal/v1/brain-interactions/queue \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8090/internal/v1/brain-interactions/queue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8090/internal/v1/brain-interactions/queue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8090",
CURLOPT_URL => "http://localhost:8090/internal/v1/brain-interactions/queue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8090/internal/v1/brain-interactions/queue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8090/internal/v1/brain-interactions/queue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8090/internal/v1/brain-interactions/queue")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"read_at": "2023-11-07T05:31:56Z",
"worker": {
"state": "running",
"blocked_at": "2023-11-07T05:31:56Z"
},
"total": {
"pending": 1,
"oldest_pending_at": "2023-11-07T05:31:56Z",
"oldest_pending_seconds": 1,
"dead_last_24h": 1,
"unconfirmed_creations": 1,
"connection_id": "<string>"
},
"connections": [
{
"pending": 1,
"oldest_pending_at": "2023-11-07T05:31:56Z",
"oldest_pending_seconds": 1,
"dead_last_24h": 1,
"unconfirmed_creations": 1,
"connection_id": "<string>"
}
]
}Ver la cola de señales a Brain
Los tres números que un operador pregunta antes de abrir la base, por conexión y en total: cuántas entregas esperan, desde cuándo espera la más vieja y cuántas murieron en las últimas 24 horas. Más el estado del worker que las entrega: blocked es que Brain contestó 401 y nadie va a reintentar hasta que una persona arregle el token.
Sólo lectura. No toma filas ni las toca, así que se puede consultar mientras el worker corre. Es del principal backend, como las claves de storefront, porque es la superficie de operación de una conexión.
curl --request GET \
--url http://localhost:8090/internal/v1/brain-interactions/queue \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8090/internal/v1/brain-interactions/queue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8090/internal/v1/brain-interactions/queue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8090",
CURLOPT_URL => "http://localhost:8090/internal/v1/brain-interactions/queue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8090/internal/v1/brain-interactions/queue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8090/internal/v1/brain-interactions/queue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8090/internal/v1/brain-interactions/queue")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"read_at": "2023-11-07T05:31:56Z",
"worker": {
"state": "running",
"blocked_at": "2023-11-07T05:31:56Z"
},
"total": {
"pending": 1,
"oldest_pending_at": "2023-11-07T05:31:56Z",
"oldest_pending_seconds": 1,
"dead_last_24h": 1,
"unconfirmed_creations": 1,
"connection_id": "<string>"
},
"connections": [
{
"pending": 1,
"oldest_pending_at": "2023-11-07T05:31:56Z",
"oldest_pending_seconds": 1,
"dead_last_24h": 1,
"unconfirmed_creations": 1,
"connection_id": "<string>"
}
]
}Autorizaciones
crossup-backend, actuando por la sesión de panel de un merchant (ADR 0010). Su superficie son las tres rutas de claves de storefront de una conexión y nada más.
Respuesta
La cola, leída en read_at.
El worker de ingestion-api que entrega la cola. blocked es un 401 de Brain: la cola queda intacta y nadie reintenta hasta que una persona arregle el token. disabled es un proceso sin Brain configurado: las señales se aceptan igual y esperan.
Show child attributes
Show child attributes
Los tres números de una porción de la cola. Con connection_id es una conexión; sin él, el total.
Show child attributes
Show child attributes
Una entrada por conexión con pendientes o muertas en la ventana.
Show child attributes
Show child attributes