You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After playing around more with this I noticed that even though pqid was set in the put method. it returns the latest sequence number of the sql table i.e 1 instead of 100
I tried setting timeout=0 but it raises Empty error.
The text was updated successfully, but these errors were encountered:
w1am
changed the title
Get() hangs when there is more than one job in the queue
Get() hangs when used with pqid
Nov 4, 2022
I don't think you cannot set a custom pqid when you create your item. Take a look at q.queue() to see how your data is being stored: [{'id': 1, 'data': {'pqid': 100, 'name': 'william'}, 'timestamp': 1669919848.33653}]
So you are storing a dictionary which contains a pqid entry inside it but the actual id under which your dictionary gets stored under is 1. Thus x = q.get(id={ "pqid": 100, "name": "william" }) will block indefinitely or raise and Empty error as there is no element stored that has an id of { "pqid": 100, "name": "william" } like you are asking for. On the other hand q.get(id=1) will work and return {'pqid': 100, 'name': 'william'}.
After playing around more with this I noticed that even though pqid was set in the put method. it returns the latest sequence number of the sql table i.e
1
instead of100
I tried setting
timeout=0
but it raises Empty error.The text was updated successfully, but these errors were encountered: