a month ago
Hi, I added a new variable:
WORKER_REDIS_URL="${{worker-redis.REDIS_URL}}"
However when I try to access it:
import os
from celery import Celery
# Find all REDIS env vars for debugging
redis_vars = {k: v[:30] + "..." for k, v in os.environ.items() if "REDIS" in k.upper()}
SlackNotifier().send("Shopify alert dispatch - env check", level="info", extra={
"tenant_host": tenant_host,
"user_id": user_id,
"redis_env_vars": redis_vars,
})
broker = os.getenv("W_REDIS_URL")
if not broker:
SlackNotifier().send("W_REDIS_URL not set — falling back to FBA_REDIS_URL", level="warn")
return
client = Celery(broker=broker)
result = client.send_task("tasks.send_shopify_integration_alert", args=[tenant_host, user_id])```
It says it's not present (already redeployed like 20 times), when I printed all the variables containing REDIS it just showed this:
```{
"tenant_host": "urvadevelopments.com",
"user_id": "cus_KWy5OcF7M8bY",
"redis_env_vars": {
"REDIS_URL": "redis://default:LrqDLCVktOnYyo..."
}
}```19 Replies
Even tried changing the name and nothing
Attachments
Attachments
Attachments
When I view the variable in railway the REDIS URL is correct, not null
I've never had this issue before so not too sure what could be happening
You say you've added the variable WORKER_REDIS_URL, but are trying to get the variable W_REDIS_URL, could that be the issue?
I then changed it to another name to see if it was just a naming issue for some odd reason
Only thing i can come up with is checking if the variable name is the same within your code as the environment ones, otherwise i have no clue...
Yeah but as I showed above, even when I print out the variables containing REDIS it does not appear
hey i was also facing variable issue , then got to know it's taking more time to save and reflect changes
Ok now it worked, that was odd, had to add the variable to the other deployments that shared the same codebase