Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin'
Browse files Browse the repository at this point in the history
  • Loading branch information
felix5572 committed Jul 31, 2021
2 parents d6b2b72 + 0e32ea7 commit f463cf0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions dpdispatcher/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ def try_recover_from_json(self):
submission_dict_str = self.machine.context.read_file(fname=submission_file_name)
submission_dict = json.loads(submission_dict_str)
submission = Submission.deserialize(submission_dict=submission_dict)
submission.bind_machine(machine=self.machine)
if self == submission:
self.belonging_jobs = submission.belonging_jobs
self.bind_machine(machine=self.machine)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
paramiko
dargs
dargs>=0.2.6
oss2
16 changes: 16 additions & 0 deletions scripts/script_gen_dargs_json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from dpdispatcher import Resources, Task, Machine
from dargs import ArgumentEncoder
import json

resources_dargs = Resources.arginfo()
with open('dpdispatcher-resources.json', 'w') as f:
json.dump(resources_dargs, f, cls=ArgumentEncoder)

machine_dargs = Machine.arginfo()
with open('dpdispatcher-machine.json', 'w') as f:
json.dump(machine_dargs, f, cls=ArgumentEncoder)

task_dargs = Task.arginfo()
with open('dpdispatcher-task.json', 'w') as f:
json.dump(task_dargs, f, cls=ArgumentEncoder)

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
with open(path.join(NAME, '_date.py'), 'w') as fp :
fp.write('date = \'%s\'' % today)

install_requires=['paramiko', 'dargs', 'requests']
install_requires=['paramiko', 'dargs>=0.2.6', 'requests']

setuptools.setup(
name=NAME,
Expand Down

0 comments on commit f463cf0

Please sign in to comment.