SQS connection.send_message() does not set message delay with delay_seconds = 0
koreindian opened this issue · comments
I noticed that when standard queues have a delay time set, that messages which are being sent to that queue are not delayed when specifying their delay_seconds
to be 0
. This is due to the following bad conditional logic in boto/sqs/connection.py which treats 0
like None
:
def send_message(self, queue, message_content, delay_seconds=None,
message_attributes=None):
...
if delay_seconds:
params['DelaySeconds'] = int(delay_seconds)
...