Skip to content

Commit

Permalink
[aws] Add sleep between function code and configuration update to avo…
Browse files Browse the repository at this point in the history
…id 'conccurent update' errors
  • Loading branch information
mcopik committed Mar 22, 2022
1 parent dafbcec commit c200fe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sebs/aws/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ def update_function(self, function: Function, code_package: Benchmark):
self.client.update_function_code(
FunctionName=name, S3Bucket=bucket, S3Key=code_package_name
)
self.logging.info(
f"Updated code of {name} function. "
"Sleep 5 seconds before updating configuration to avoid cloud errors."
)
time.sleep(5)
# and update config
self.client.update_function_configuration(
FunctionName=name, Timeout=function.timeout, MemorySize=function.memory
Expand Down

0 comments on commit c200fe4

Please sign in to comment.