File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,33 +42,18 @@ def app_method(
4242 ) -> Any :
4343 handler = self .handlers [app_name ]() # Remove app_name from instantiation
4444
45- # Check if handler's generate_job_info expects app_name
46- if "app_name" in handler .generate_job_info .__code__ .co_varnames :
47- job_info = handler .generate_job_info (
48- self .tapis ,
49- input_uri or "tapis://example/input/" ,
50- input_file ,
51- job_name ,
52- app_name , # Pass app_name for handlers that expect it
53- max_minutes ,
54- node_count ,
55- cores_per_node ,
56- queue ,
57- allocation ,
58- )
59- else :
60- # For MPM-style handlers that don't expect app_name
61- job_info = handler .generate_job_info (
62- self .tapis ,
63- input_uri or "tapis://example/input/" ,
64- input_file ,
65- job_name ,
66- max_minutes ,
67- node_count ,
68- cores_per_node ,
69- queue ,
70- allocation ,
71- )
45+ job_info = handler .generate_job_info (
46+ self .tapis ,
47+ input_uri or "tapis://example/input/" ,
48+ input_file ,
49+ job_name ,
50+ app_name ,
51+ max_minutes ,
52+ node_count ,
53+ cores_per_node ,
54+ queue ,
55+ allocation ,
56+ )
7257
7358 return job_info
7459
Original file line number Diff line number Diff line change 55class MpmJobHandler (BaseJobHandler ):
66 """Custom handler for MPM (Material Point Method) jobs."""
77
8+ def __init__ (self ):
9+ """Initialize with fixed mpm app name."""
10+ super ().__init__ (default_app_name = "mpm" )
11+
812 def generate_job_info (
913 self ,
1014 tapis_client ,
1115 input_uri : str ,
1216 input_file : str ,
1317 job_name : Optional [str ] = None ,
18+ app_name : Optional [str ] = None ,
1419 max_minutes : Optional [int ] = None ,
1520 node_count : Optional [int ] = None ,
1621 cores_per_node : Optional [int ] = None ,
You can’t perform that action at this time.
0 commit comments