Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kale/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def publish(self, task_class, task_id, payload,

sqs_queue.send_message(
MessageBody=kale_msg.encode(),
DelaySeconds=delay_sec or 1
DelaySeconds=delay_sec or 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more appropriate backwards compatible change would be to change the default value in the parameter list to delay_sec=1 and remove the delay_sec is not None check above (L35). The parameter is an int therefore None can be expected to raise a TypeError. Then change this line to DelaySeconds=delay_sec.

)

logger.debug('Published task. Task id: %s; Task name: %s' % (
Expand Down