@@ -385,6 +385,7 @@ def updateLinks(self, grp_ids):
385385 raise IOError ("hsds_writer unable to update links" )
386386 else :
387387 self .log .debug (f"hsds_writer> { grp_id } { count } links updated" )
388+ self ._lastModified = time .time ()
388389
389390 def updateAttributes (self , obj_ids ):
390391 """ update any modified links of the given objects """
@@ -418,6 +419,7 @@ def updateAttributes(self, obj_ids):
418419 self .log .error (f"hsds_writer> put { req } failed, status: { put_rsp .status_code } " )
419420 else :
420421 self .log .debug (f"hsds_writer> { count } attributes updated" )
422+ self ._lastModified = time .time ()
421423
422424 def updateValue (self , dset_id , sel , arr ):
423425 """ update the given dataset using selection and array """
@@ -437,6 +439,7 @@ def updateValue(self, dset_id, sel, arr):
437439 self .log .error (f"PUT { req } returned error: { rsp .status_code } " )
438440 else :
439441 self .log .debug (f"PUT { len (data )} bytes successful" )
442+ self ._lastModified = time .time ()
440443
441444 def updateValues (self , dset_ids ):
442445 """ write any pending dataset values """
@@ -476,7 +479,6 @@ def flush(self):
476479 if not self ._http_conn :
477480 self .log .warning ("hsds_writer no http connection" )
478481 raise IOError ("no http connection" )
479-
480482 self .log .info ("hsds_writer.flush()" )
481483 self .log .debug (f" new object count: { len (self .db .new_objects )} " )
482484 self .log .debug (f" dirty object count: { len (self .db .dirty_objects )} " )
@@ -535,3 +537,15 @@ def isClosed(self):
535537 def get_root_id (self ):
536538 """ Return root id """
537539 return self ._root_id
540+
541+ def getStats (self ):
542+ """ return a dictionary object with at minimum the following keys:
543+ 'created': creation time
544+ 'lastModified': modificationTime
545+ 'owner': owner name
546+ """
547+ stats = {}
548+ stats ['created' ] = 0
549+ stats ["lastModified" ] = 0
550+ stats ['owner' ] = ""
551+ return stats
0 commit comments