Fix message claim expires problem in swift storage
In swift storage, message can't be claimed after claim expires, this patch fix it. Change-Id: I10fd37d46c7afbbd519c641cf8c94bbb70a194f7
This commit is contained in:
parent
eed85588a4
commit
1b0bf4e735
@ -121,9 +121,11 @@ class MessageController(storage.Message):
|
||||
raise
|
||||
|
||||
def is_claimed(msg, headers):
|
||||
if include_claimed:
|
||||
if include_claimed or msg['claim_id'] is None:
|
||||
return False
|
||||
return msg['claim_id'] is not None
|
||||
claim_obj = self.driver.claim_controller._get(
|
||||
queue, msg['claim_id'], project)
|
||||
return claim_obj is not None and claim_obj['ttl'] > 0
|
||||
|
||||
def is_echo(msg, headers):
|
||||
if echo:
|
||||
|
Loading…
x
Reference in New Issue
Block a user