Beispiel #1
0
 def purge(
         self,
         *,
         body: bodies.Body,
         patch: patches.Patch,
         storage: progress.ProgressStorage,
 ) -> None:
     # Purge only our own handlers. Ignore others (e.g. other operators).
     for handler_id in self.keys():
         storage.purge(key=handler_id, body=body, patch=patch)
     storage.flush()
Beispiel #2
0
 def purge(
     self,
     *,
     body: bodies.Body,
     patch: patches.Patch,
     storage: progress.ProgressStorage,
 ) -> None:
     # Purge only our own handlers and their direct & indirect sub-handlers of all levels deep.
     # Ignore other handlers (e.g. handlers of other operators).
     for handler_id, handler_state in self.items():
         storage.purge(key=handler_id, body=body, patch=patch)
         for subref in handler_state.subrefs:
             storage.purge(key=subref, body=body, patch=patch)
     storage.flush()