Skip to content

Commit

Permalink
clamp to int
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed Apr 4, 2024
1 parent 04c41a2 commit 1ffac73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cactus/shared/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def cactus_override_toil_options(options):

def cactus_clamp_memory(memory_bytes):
""" use the environment variables from --maxMemory and --defaultMemory to clamp a given memory value """
return max(min(int(os.environ['CACTUS_MAX_MEMORY']), memory_bytes), int(os.environ['CACTUS_DEFAULT_MEMORY']))
return max(min(int(os.environ['CACTUS_MAX_MEMORY']), int(memory_bytes)), int(os.environ['CACTUS_DEFAULT_MEMORY']))

def makeURL(path_or_url):
if urlparse(path_or_url).scheme == '':
Expand Down

0 comments on commit 1ffac73

Please sign in to comment.