fugangqiang / pyxqueue Goto Github PK
View Code? Open in Web Editor NEWa multi-processes task queue using redis streams.
License: MIT License
a multi-processes task queue using redis streams.
License: MIT License
Any plans to change this to async functionality? By the way, your code looks heavily inspired from http://charlesleifer.com/blog/multi-process-task-queue-using-redis-streams/ - might want to add a note/ comment.
Cheers
I'm getting this issue while implement
How to resolve this issue unable to understand?
(venv) xxxx@xxxxx:~/$ python3 app.py 1 worker processes started. Press Ctrl+C to exit. Process Process-1: Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "venv/lib/python3.8/site-packages/pyxqueue.py", line 250, in run pending_resp = self.client.xpending_range( TypeError: xpending_range() missing 2 required positional arguments: 'min' and 'max'
This is my code:
`client = redis.Redis()
queue = TaskQueue(client, stream_key='background-task')
@queue.task
def sleep(n):
print(f'going to sleep for {n} seconds')
time.sleep(n)
print(f'woke up after {n} seconds')
if name == "main":
queue.run(1)
app.run(host='0.0.0.0', port=PORT, threaded=True, load_dotenv=True, debug=DEBUG)
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.