Skip to content

Commit

Permalink
fix: modify memory allocated logic in cloud functions service
Browse files Browse the repository at this point in the history
  • Loading branch information
stat-kwon committed Mar 21, 2024
1 parent 5fe8b95 commit b1d8d7c
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 b1d8d7c

Please sign in to comment.