Default TimeoutSeconds to 1 hour (#1592)
TimeoutSeconds isn't a required field so we can't rely on it being there. Quick tests against the AWS API show that when it's not specified the ExpiresAfter field seems to be 1 hour after the request.
This commit is contained in:
parent
56a56fc626
commit
21a264c337
2 changed files with 1 additions and 2 deletions
|
|
@ -144,7 +144,7 @@ class SimpleSystemManagerBackend(BaseBackend):
|
|||
def send_command(self, **kwargs):
|
||||
instances = kwargs.get('InstanceIds', [])
|
||||
now = datetime.datetime.now()
|
||||
expires_after = now + datetime.timedelta(0, int(kwargs['TimeoutSeconds']))
|
||||
expires_after = now + datetime.timedelta(0, int(kwargs.get('TimeoutSeconds', 3600)))
|
||||
return {
|
||||
'Command': {
|
||||
'CommandId': str(uuid.uuid4()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue