Skip to content

Commit

Permalink
Refactor define_memory_requested and define_time_requested functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alsmith151 committed Jul 24, 2024
1 parent 6ff4793 commit f88c53c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions seqnado/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def define_memory_requested(attempts: int = 1, initial_value: int = 1, scale: f
"""
Define the memory requested for the job.
"""
memory = initial_value * 2 ** attempts
memory = memory * scale
memory = int(initial_value) * 2 ** int(attempts)
memory = memory * float(scale)
return f"{memory}G"

def define_time_requested(attempts: int = 1, initial_value: int = 1, scale: float = 1) -> str:
Expand All @@ -72,8 +72,8 @@ def define_time_requested(attempts: int = 1, initial_value: int = 1, scale: floa
Base time is 1 hour.
"""
time = initial_value * 2 ** attempts
time = time * scale
time = int(initial_value) * 2 ** int(attempts)
time = time * float(scale)
return f"{time}h"


Expand Down

0 comments on commit f88c53c

Please sign in to comment.