File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ def make_resource_fn(rule_name, kind):
9999 - <kind>_scaler
100100 - <kind>_max
101101 """
102- def _fn (wildcards , inputs = [], threads = None , attempt = 1 ):
102+ def _fn (wildcards , input = [], threads = None , attempt = 1 ):
103103 # Config keys (mem or time)
104104 o_key = f"{ kind } -offset"
105105 s_key = f"{ kind } -scaler"
@@ -114,7 +114,8 @@ def make_resource_fn(rule_name, kind):
114114 capped = rule_cfg .get (m_key , resources_config ["default" ][m_key ])
115115
116116 # Compute the total file size in MB
117- total = sum (Path (f ).stat ().st_size for f in inputs ) / 1000000.0
117+ total = sum (Path (f ).stat ().st_size for f in input ) / 1000000.0
118+ # Alternative: total = input.size_mb
118119
119120 # Compute the resource value, capping it at the max.
120121 mul = factor ** (attempt - 1 )
You can’t perform that action at this time.
0 commit comments