equal
deleted
inserted
replaced
423 def shutdown(self): |
423 def shutdown(self): |
424 """called on server stop event to properly close opened sessions and |
424 """called on server stop event to properly close opened sessions and |
425 connections |
425 connections |
426 """ |
426 """ |
427 assert not self.shutting_down, 'already shutting down' |
427 assert not self.shutting_down, 'already shutting down' |
|
428 if not (self.config.creating or self.config.repairing |
|
429 or self.config.quick_start): |
|
430 # then, the system source is still available |
|
431 self.hm.call_hooks('before_server_shutdown', repo=self) |
428 self.shutting_down = True |
432 self.shutting_down = True |
429 self.system_source.shutdown() |
433 self.system_source.shutdown() |
430 if self._tasks_manager is not None: |
434 if self._tasks_manager is not None: |
431 self._tasks_manager.stop() |
435 self._tasks_manager.stop() |
432 if not (self.config.creating or self.config.repairing |
436 if not (self.config.creating or self.config.repairing |