From 4562f52c9b540944200b33d4ffbd60b3cbc5ee79 Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Wed, 17 Jun 2026 18:08:56 +0200 Subject: feat: managed to retrieve metric-by-metric from Redis in real time --- shell_scripts/useful_commands.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 shell_scripts/useful_commands.sh (limited to 'shell_scripts') diff --git a/shell_scripts/useful_commands.sh b/shell_scripts/useful_commands.sh new file mode 100644 index 00000000..8ff604e2 --- /dev/null +++ b/shell_scripts/useful_commands.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +doas su postgres +# In this project we only use the ``opendc'' database. +psql -d opendc + +# Queries +# Selects everything from the topic which Kafka writes to. +SELECT * FROM postgres_topic; + +# Redis CLI +# Connect to Redis +redis-cli -h localhost -p 6379 +# Very useful tutorial https://redis.io/docs/latest/develop/data-types/streams/ +# https://redis.io/docs/latest/develop/tools/cli/ +# Returns all items in the Redis stream +XRANGE postgres_topic - + +XTRIM postgres_topic MAXLEN 0 +# https://codesignal.com/learn/courses/mastering-redis-for-high-performance-applications-with-java-and-jedis-1/lessons/redis-streams-with-java -- cgit v1.2.3