Skip to content

Commit 02318b7

Browse files
Fix retry count (#363)
1 parent f8470e8 commit 02318b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dpdispatcher/dp_cloud_server_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def machine_subfields(cls) -> List[Argument]:
307307
"retry_count",
308308
[int, type(None)],
309309
optional=True,
310-
default=3,
310+
default=2,
311311
doc=doc_retry_count,
312312
),
313313
Argument(

dpdispatcher/submission.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ def handle_unexpected_job_state(self):
841841
retry_count = 3
842842
assert self.machine is not None
843843
if hasattr(self.machine, "retry_count") and self.machine.retry_count > 0:
844-
retry_count = self.machine.retry_count
844+
retry_count = self.machine.retry_count + 1
845845
if (self.fail_count) > 0 and (self.fail_count % retry_count == 0):
846846
raise RuntimeError(
847847
f"job:{self.job_hash} {self.job_id} failed {self.fail_count} times.job_detail:{self}"

0 commit comments

Comments
 (0)