Skip to content

Commit

Permalink
Merge pull request #23 from gumgum/develop
Browse files Browse the repository at this point in the history
Minor changes
  • Loading branch information
javimol authored Jun 24, 2019
2 parents edc4926 + a590fe1 commit ecbc33d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions multivitamin/apis/sqs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,14 @@ def delete_message(self, request_id):
request_id: request_id from sqs.receive_message
"""
self.sqs.delete_message(QueueUrl=self.queue_url, ReceiptHandle=request_id)

@staticmethod
def delete_message_thead_safe(request_id,queue_url):
"""Delete a message from the SQS queue given a request_id
Args:
request_id: request_id from sqs.receive_message
queueurl: the url of the queue from which to delete the message
"""
sqs = boto3.client("sqs")
sqs.delete_message(QueueUrl=queue_url, ReceiptHandle=request_id)

0 comments on commit ecbc33d

Please sign in to comment.