Skip to content

How to add a constraint on the item ? #220

Discussion options

You must be logged in to vote

I´ve got it..

If someone need to know, UniqueAckQ do the trick..

My test example:

uq = persistqueue.UniqueAckQ('pathuq')
item = uq.get(raw=True)
print(item)
uq.ack(item)

When ack the item, it change to status 5

The put code :

uq = persistqueue.UniqueAckQ('pathuq')
uq.put(item)

When the queue is empty, with all items in status 5, get will wait for another item.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peter-wangxu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant