mirror of
https://github.com/vale981/jobmanager
synced 2025-03-06 02:11:39 -05:00
use special id flag store data via persistentData_Server, made merge_arg_and_const_arg work with new 'id' used by PersistentData_Server
This commit is contained in:
parent
fa17cefe97
commit
a81f15deb3
2 changed files with 7 additions and 3 deletions
|
@ -67,7 +67,11 @@ def merge_arg_and_const_arg(arg, const_arg):
|
|||
kwargs.update(arg)
|
||||
# remove args as they have been constructed explicitly
|
||||
if 'args' in kwargs:
|
||||
kwargs.pop('args')
|
||||
del kwargs['args']
|
||||
|
||||
# remove id, when it comes from the persistentDataServer
|
||||
if 'id' in kwargs:
|
||||
del kwargs['id']
|
||||
|
||||
return args_dgl, kwargs
|
||||
|
||||
|
|
|
@ -85,10 +85,10 @@ class PersistentData_Server(JobManager_Server):
|
|||
print("{}: overwriting existing data is DISABLED".format(self._identifier))
|
||||
|
||||
def process_new_result(self, arg, result):
|
||||
self.pds[data_as_binary_key(arg)] = result
|
||||
self.pds[data_as_binary_key(arg.id)] = (arg, result)
|
||||
|
||||
def put_arg(self, a):
|
||||
a_bin = data_as_binary_key(a)
|
||||
a_bin = data_as_binary_key(a.id)
|
||||
if self.overwrite or (not a_bin in self.pds):
|
||||
JobManager_Server.put_arg(self, a)
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue