mirror of
https://github.com/vale981/jobmanager
synced 2025-03-05 09:51:38 -05:00
minor change
This commit is contained in:
parent
0fa9244cda
commit
e9cc57b3e6
1 changed files with 10 additions and 1 deletions
|
@ -85,7 +85,16 @@ 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.id)] = (arg, result)
|
||||
"""
|
||||
use arg.id as key to store the pair (arg, result) in the data base
|
||||
|
||||
return True, if a new data set was added (key not already in pds)
|
||||
otherwise false
|
||||
"""
|
||||
key = data_as_binary_key(arg.id)
|
||||
has_key = key in self.pds
|
||||
self.pds[key] = (arg, result)
|
||||
return not has_key
|
||||
|
||||
def put_arg(self, a):
|
||||
a_bin = data_as_binary_key(a.id)
|
||||
|
|
Loading…
Add table
Reference in a new issue