You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
# logbus/publisher.py
|
|
import redis
|
|
import os
|
|
|
|
REDIS_URL = os.getenv("REDIS_BROKER", "redis://redis:6379/0")
|
|
|
|
r = redis.Redis.from_url(REDIS_URL)
|
|
|
|
|
|
def log(message):
|
|
print("[LOG]", message)
|
|
r.publish("logs", message)
|