Skip to content

Commit

Permalink
Try to delay sync shutting down until MVR finishes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Nov 2, 2023
1 parent 87b52c5 commit e1ef572
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/np_workflows/shared/base_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,9 @@ def stop_recording_after_stim_finished(self,
time.sleep(5)
for stoppable in (_ for _ in recorders if isinstance(_, Stoppable)):
stoppable.stop()
if isinstance(stoppable, np_services.MVR):
time.sleep(3)
if issubclass(stoppable, np_services.MVR) or 'MVR' in stoppable.__class__.__name__:
time.sleep(v := 3)
logger.info(f'Waiting additional {v}s for MVR to finish writing...')

def start_services(self, *services: Service) -> None:
if not services:
Expand Down

0 comments on commit e1ef572

Please sign in to comment.