Set messages ttl to claims ttl
Make sure messages being updated have the same ttl as claim. This update happens when claimed messages have a ttl lower than claim's. Implements blueprint storage-mongodb Change-Id: Ide529895760fd6e1b207611729e1da5e250cbafb
This commit is contained in:
parent
f3963d0a8c
commit
221e934c71
@ -484,7 +484,7 @@ class ClaimController(storage.ClaimBase):
|
||||
msg_ctrl._col.update({"q": queue,
|
||||
"e": {"$lt": expires},
|
||||
"c.id": oid},
|
||||
{"$set": {"e": expires}},
|
||||
{"$set": {"e": expires, "t": ttl}},
|
||||
upsert=False, multi=True)
|
||||
|
||||
if updated != 0:
|
||||
@ -529,7 +529,7 @@ class ClaimController(storage.ClaimBase):
|
||||
msg_ctrl._col.update({"q": qid,
|
||||
"e": {"$lt": expires},
|
||||
"c.id": cid},
|
||||
{"$set": {"e": expires}},
|
||||
{"$set": {"e": expires, "t": ttl}},
|
||||
upsert=False, multi=True)
|
||||
|
||||
def delete(self, queue, claim_id, tenant=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user