parameters: (self)
docstring: Stop scheduler.
docstring_summary: Stop scheduler.
docstring_tokens: Stop scheduler .
function: def stop(self):
          """Stop scheduler."""
          self.running = False
  
          # Force stop all analysis managers.
          for am in self.analysis_managers:
              try:
                  am.force_stop()
              except Exception as e:
                  log.exception("Error force stopping analysis manager: %s", e)
  
          # Shutdown machine manager (used to kill machines that still alive).
          machinery.shutdown()
  
          # Remove network rules if any are present and stop auxiliary modules
          for am in self.analysis_managers:
              try:
                  am.cleanup()
              except Exception as e:
                  log.exception(
                      "Error while cleaning up analysis manager: %s", e
                  )
function_tokens: def stop ( self ) : self . running = False # Force stop all analysis managers. for am in self . analysis_managers : try : am . force_stop ( ) except Exception as e : log . exception ( "Error force stopping analysis manager: %s" , e ) # Shutdown machine manager (used to kill machines that still alive). machinery . shutdown ( ) # Remove network rules if any are present and stop auxiliary modules for am in self . analysis_managers : try : am . cleanup ( ) except Exception as e : log . exception ( "Error while cleaning up analysis manager: %s" , e )