server/repository.py
branchstable
changeset 5749 b4393b681f7a
parent 5747 d6ac0cd30fde
child 5752 b0bb553e3be4
child 5808 2de32c0c293b
equal deleted inserted replaced
5748:487ab6ac90cc 5749:b4393b681f7a
   323         """called on server stop event to properly close opened sessions and
   323         """called on server stop event to properly close opened sessions and
   324         connections
   324         connections
   325         """
   325         """
   326         assert not self._shutting_down, 'already shutting down'
   326         assert not self._shutting_down, 'already shutting down'
   327         self._shutting_down = True
   327         self._shutting_down = True
       
   328         self.system_source.shutdown()
   328         if isinstance(self._looping_tasks, tuple): # if tasks have been started
   329         if isinstance(self._looping_tasks, tuple): # if tasks have been started
   329             for looptask in self._looping_tasks:
   330             for looptask in self._looping_tasks:
   330                 self.info('canceling task %s...', looptask.name)
   331                 self.info('canceling task %s...', looptask.name)
   331                 looptask.cancel()
   332                 looptask.cancel()
   332                 looptask.join()
   333                 looptask.join()