I’m using Python FastAPI with redis. I wrote a function to update values in a redis hash, but I couldn’t able to update a single value alone, I could only able to re-write the whole hash. My model: My function: Answer hmset is deprecated for hset – but if you want to only update a single key, do not send
Tag: redis
Celery jobs not running on heroku (python/django app)
I have a Django app setup with some scheduled tasks. The app is deployed on Heroku with Redis. The task runs if invoked synchronously in the console, or locally when I also have redis and celery running. However, the scheduled jobs are not running on Heroku. My task: celery.py: In Procfile: worker: celery -A my_app worker –beat -S django -l
asyncio python coroutine cancelled while task still pending reading from redis channel
I have multiple couroutines each of which waits for content in a queue to start processing. The content for the queues is populated by channel subscribers whose job is only to receive messages a push an item in the appropriate queue. After the data is consumed by one queue processor and new data is generated it’s dispatched to the appropriate
Unable to connect to AWS ElastiCache form python client
I have an AWS ElastiCache instance of 2 replicated nodes (cluster-mode disabled). I am able to connect through my java client using redisson (a service running in the same cluster). However, when I’m using the python redis client, it does not seem to connect. Or it seems to connect but doesn’t subscribe. I don’t see any errors for connection, but
Asynchronous code failure when connecting to redis
I created a small class to perform basic operations with redis, using aioredis. And a test handler to call the write/read operation for redis But get error I guess the problem could be that the asynchronous code has to be run through an event loop But I can’t understand how I can build this logic into my code Answer Your
How to create a column and set key and value to redis using Python
I have been trying to figure out how I can set key and value to a specific column. By column I mean something like: What im trying to achieve here is that I would like to be able to add a new “column” which is fruit, book and paint and inside those values I would like to add another “column”
RQ task from Flask keeps adding to queue
My setup is: Running Redis on docker locally running RQ in virtualenv(rq) running Flask in virtualenv(rq) Goal is to launch RQ tasks by hitting the Flask app. Redis seems to running fine, as does the rq worker (launched by “rq worker”) Simple tasks get queued and done. The simple subprocessed “ls” task2 runs fine. But my subprocessed python does not!
How to handle “Redis.exceptions.ConnectionError: Connection has data”
I receive following output: I couldn’t find any issue related to this particular error. I emptied/flushed all redis databases, so there should be no data there. I assume it has something to do with eventlet and patching. But even when I put following code right at the beginning of the file, the error appears. What does this error mean? Answer
Can I use Redis installed on Windows Subsystem for Linux with a python app in Windows?
I would like to develop a python application on Windows that will use Redis as a broker for Celery. Is it correct to assume that my application can interact with an instance of Redis that I have installed on the Windows Subsystem for Linux? I have enabled the Windows Subsystem for Linux on Windows 10, and installed Ubuntu and Redis
Fastest way to store a numpy array in redis
I’m using redis on an AI project. The idea is to have multiple environment simulators running policies on a lot of cpu cores. The simulators write experience (a list of state/action/reward tuples) to a redis server (replay buffer). Then a training process reads the experience as a dataset to generate a new policy. New policy is deployed to the simulators,