Skip to content

Commit

Permalink
Merge pull request #111 from stat-kwon/master
Browse files Browse the repository at this point in the history
Modify memory allocated logic in cloud functions service
  • Loading branch information
stat-kwon authored Mar 21, 2024
2 parents 5fe8b95 + b1d8d7c commit 7a7786f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ def _make_timeout(timeout):
@staticmethod
def _make_memory_allocated(memory):
try:
number, unit = memory.split("Mi")
number, *unit = memory.split("Mi")
return f"{number} MiB"
except ValueError:
number, unit = memory.split("M")
number, *unit = memory.split("M")
return f"{number} MiB"
except Exception:
number, unit = memory.split("Gi")
number, *unit = memory.split("Gi")
return f"{number} GiB"

@staticmethod
Expand Down

0 comments on commit 7a7786f

Please sign in to comment.