mirror of
https://github.com/vale981/jobmanager
synced 2025-03-06 02:11:39 -05:00
minor advances in show PDS stats
This commit is contained in:
parent
0030b7c8bb
commit
3a8ffe62ea
2 changed files with 9 additions and 0 deletions
|
@ -4,6 +4,7 @@ import os
|
|||
import sys
|
||||
import shutil
|
||||
import traceback
|
||||
import pickle
|
||||
|
||||
if sys.version_info[0] == 2:
|
||||
# fixes keyword problems with python 2.x
|
||||
|
@ -182,6 +183,11 @@ class PersistentDataStructure(object):
|
|||
sys.stdout.flush()
|
||||
if recursive:
|
||||
for k in self.sub_data_keys:
|
||||
if isinstance(k, bytes):
|
||||
k = pickle.loads(k)
|
||||
print("show stat for subdata with key {}".format(k))
|
||||
|
||||
|
||||
with self.getData(k) as subdata:
|
||||
subdata.show_stat(recursive = recursive,
|
||||
prepend = prepend + "->")
|
||||
|
|
|
@ -91,4 +91,7 @@ class PersistentData_Server(JobManager_Server):
|
|||
a_bin = data_as_binary_key(a)
|
||||
if self.overwrite or (not a_bin in self.pds):
|
||||
JobManager_Server.put_arg(self, a)
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue