Skip to content

Commit 86012a4

Browse files
committed
Add more common helpers to runtime block
1 parent 267a90c commit 86012a4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

wdlgen/task.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ def get_string(self):
3434
def add_docker(self, docker):
3535
self.kwargs["docker"] = docker
3636

37+
def add_cpus(self, cpus):
38+
self.kwargs["cpu"] = cpus
39+
40+
def add_memory(self, memory_gb):
41+
self.kwargs["memory"] = f"{memory_gb}G"
42+
43+
def add_gcp_disk(self, disk_size_gb):
44+
self.kwargs["disks"] = f"local-disk {disk_size_gb} SSD"
45+
46+
def add_gcp_boot_disk(self, disk_size_gb: int):
47+
self.kwargs["bootDiskSizeGb"] = int(disk_size_gb)
48+
3749
class Command(WdlBase):
3850
"""
3951
Past the regular attributes, I've built the command generation here, because that's where

0 commit comments

Comments
 (0)