Skip to content

Commit 9efc5c0

Browse files
authored
Update submission.py (#499)
Cleanup some unused comments <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced submission state recovery through improved JSON handling. - Improved job state management with refined error handling and logging. - **Bug Fixes** - Updated methods to better manage unexpected job states. - **Documentation** - Clarified method signatures and functionality in the `Submission` and `Job` classes for better understanding. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 819eddf commit 9efc5c0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

dpdispatcher/submission.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def __init__(
5555
*,
5656
task_list=[],
5757
):
58-
# self.submission_list = submission_list
5958
self.local_root = None
6059
self.work_base = work_base
6160
self._abs_work_base = os.path.abspath(work_base)
@@ -515,12 +514,9 @@ def submission_to_json(self):
515514
def submission_from_json(cls, json_file_name="submission.json"):
516515
with open(json_file_name) as f:
517516
submission_dict = json.load(f)
518-
# submission_dict = machine.context.read_file(json_file_name)
519517
submission = cls.deserialize(submission_dict=submission_dict, machine=None)
520518
return submission
521519

522-
# def check_if_recover()
523-
524520
def try_recover_from_json(self):
525521
submission_file_name = f"{self.submission_hash}.json"
526522
if_recover = self.machine.context.check_file_exists(submission_file_name)
@@ -545,7 +541,6 @@ def try_recover_from_json(self):
545541
f"machine.context.remote_root:{self.machine.context.remote_root}; "
546542
f"submission.work_base:{submission.work_base};"
547543
)
548-
# self = submission.bind_machine(machine=self.machine)
549544
else:
550545
print(self.serialize())
551546
print(submission.serialize())
@@ -759,7 +754,6 @@ def __init__(
759754
self.fail_count = 0
760755
self.job_uuid = uuid.uuid4()
761756

762-
# self.job_hash = self.get_hash()
763757
self.job_hash = self.get_hash()
764758
self.script_file_name = self.job_hash + ".sub"
765759

0 commit comments

Comments
 (0)