1414@dataclass (kw_only = True )
1515class RideSXDriver (Driver ):
1616 """RideSX Driver"""
17-
17+ decompression_timeout : int = field (default = 15 * 60 ) # 15 minutes
18+ flash_timeout : int = field (default = 30 * 60 ) # 30 minutes
19+ continue_timeout : int = field (default = 20 * 60 ) # 20 minutes
1820 storage_dir : str = field (default = "/var/lib/jumpstarter/ridesx" )
1921
2022 def __post_init__ (self ):
@@ -74,7 +76,7 @@ def _decompress_file(self, compressed_file: Path) -> Path:
7476 stderr = subprocess .PIPE ,
7577 text = False ,
7678 check = True ,
77- timeout = 600 ,
79+ timeout = self . decompression_timeout ,
7880 )
7981
8082 if result .stderr :
@@ -168,7 +170,7 @@ def flash_with_fastboot(self, device_id: str, partitions: Dict[str, str]):
168170 self .logger .debug (f"Running command: { ' ' .join (cmd )} " )
169171
170172 try :
171- result = subprocess .run (cmd , capture_output = True , text = True , check = True , timeout = 800 )
173+ result = subprocess .run (cmd , capture_output = True , text = True , check = True , timeout = self . flash_timeout )
172174 self .logger .info (f"Successfully flashed { partition_name } " )
173175 self .logger .debug (f"Flash stdout: { result .stdout } " )
174176 if result .stderr :
@@ -186,7 +188,7 @@ def flash_with_fastboot(self, device_id: str, partitions: Dict[str, str]):
186188 cmd = ["fastboot" , "-s" , device_id , "continue" ]
187189 self .logger .debug (f"Running command: { ' ' .join (cmd )} " )
188190 try :
189- result = subprocess .run (cmd , capture_output = True , text = True , check = True , timeout = 300 )
191+ result = subprocess .run (cmd , capture_output = True , text = True , check = True , timeout = self . continue_timeout )
190192 self .logger .debug (f"Fastboot continue stdout: { result .stdout } " )
191193 self .logger .debug (f"Fastboot continue stderr: { result .stderr } " )
192194 self .logger .info ("Fastboot continue completed successfully" )
0 commit comments