-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi,
You have done an excellent job.
I am facing some issues while adding tasks and getting below error.
(env310) root@ubuntu2004:~/Gsuite# python MongoQueueTest.py
Traceback (most recent call last):
File "/root/Gsuite/MongoQueueTest.py", line 4, in <module>
queue = Queue(MongoClient('localhost', 27017).task_queue, consumer_id="consumer-1", timeout=300, max_attempts=3)
File "/root/env310/lib/python3.10/site-packages/mongo_queue/queue.py", line 25, in __init__
self.ensure_indexes()
File "/root/env310/lib/python3.10/site-packages/mongo_queue/queue.py", line 54, in ensure_indexes
self.collection.create_indexes([next_index, update_index, unique_index, depend_index, repair_index])
File "/root/env310/lib/python3.10/site-packages/pymongo/collection.py", line 3503, in __call__
raise TypeError(
TypeError: 'Collection' object is not callable. If you meant to call the 'create_indexes' method on a 'Database' object it is failing because no such method exists.
Please check what should be the reason for this.
Thanks
Prashant
Metadata
Metadata
Assignees
Labels
No labels