Example #1
0
    def __init__(self, repo=None, what=""):
        """
        This is a fatal repo error
        Args:
            repo (GangaRepository): The repository the error happened in
            what (str): The original exception/error/description
        """
        super(RepositoryError, self).__init__(self, what)
        self.what = what
        self.repository = repo
        from Ganga.Utility.logging import getLogger

        logger = getLogger()
        logger.error("A severe error occurred in the Repository '%s': %s" % (repo.registry.name, what))
        logger.error('If you believe the problem has been solved, type "reactivate()" to re-enable ')
        try:
            from Ganga.Core.InternalServices.Coordinator import disableInternalServices

            disableInternalServices()
            from Ganga.Core.GangaThread.WorkerThreads import shutdownQueues

            shutdownQueues()
            logger.error("Shutting Down Repository_runtime")
            from Ganga.Runtime import Repository_runtime

            repository_runtime.shutdown()
        except:
            logger.error("Unable to disable Internal services, they may have already been disabled!")
Example #2
0
 def __init__(self,repo,what):
     self.what=what
     self.repository = repo
     logger.error("A severe error occurred in the Repository '%s': %s" % (repo.registry.name, what))
     logger.error('If you believe the problem has been solved, type "reactivate()" to re-enable ')
     disableInternalServices()
     GangaException.__init__(self,what)
Example #3
0
 def test_pass2(self):
     t = TestRepository(1)
     while not t.isReadyForCheck():
         pass
     returnable = t.checkTest()
     disableInternalServices()
     enableInternalServices()
     return returnable
Example #4
0
 def test_pass2(self):
     t = testRepository(1)
     while not t.isReadyForCheck():
         pass
     returnable = t.checkTest()
     from Ganga.Core.InternalServices.Coordinator import enableInternalServices, disableInternalServices
     disableInternalServices()
     enableInternalServices()
     return returnable
Example #5
0
 def test_pass2(self):
     t = testRepository(1)
     while not t.isReadyForCheck():
         pass
     returnable = t.checkTest()
     from Ganga.Core.InternalServices.Coordinator import enableInternalServices, disableInternalServices
     disableInternalServices()
     enableInternalServices()
     return returnable
Example #6
0
 def __init__(self, repo=None, what=''):
     GangaException.__init__(self, what)
     self.what = what
     self.repository = repo
     logger.error("A severe error occurred in the Repository '%s': %s" % (repo.registry.name, what))
     logger.error('If you believe the problem has been solved, type "reactivate()" to re-enable ')
     try:
         from Ganga.Core.InternalServices.Coordinator import disableInternalServices
         disableInternalServices()
         logger.error("Shutting Down Repository_runtime")
         from Ganga.Runtime import Repository_runtime
         Repository_runtime.shutdown()
     except:
         logger.error("Unable to disable Internal services, they may have already been disabled!")
Example #7
0
 def __init__(self, repo=None, what=''):
     GangaException.__init__(self, what)
     self.what = what
     self.repository = repo
     logger.error("A severe error occurred in the Repository '%s': %s" %
                  (repo.registry.name, what))
     logger.error(
         'If you believe the problem has been solved, type "reactivate()" to re-enable '
     )
     try:
         from Ganga.Core.InternalServices.Coordinator import disableInternalServices
         disableInternalServices()
         logger.error("Shutting Down Repository_runtime")
         from Ganga.Runtime import Repository_runtime
         Repository_runtime.shutdown()
     except:
         logger.error(
             "Unable to disable Internal services, they may have already been disabled!"
         )
Example #8
0
 def __init__(self, repo=None, what=''):
     """
     This is a fatal repo error
     Args:
         repo (GangaRepository): The repository the error happened in
         what (str): The original exception/error/description
     """
     super(RepositoryError, self).__init__(self, what)
     self.what = what
     self.repository = repo
     from Ganga.Utility.logging import getLogger
     logger = getLogger()
     logger.error("A severe error occurred in the Repository '%s': %s" % (repo.registry.name, what))
     logger.error('If you believe the problem has been solved, type "reactivate()" to re-enable ')
     try:
         from Ganga.Core.InternalServices.Coordinator import disableInternalServices
         disableInternalServices()
         from Ganga.Core.GangaThread.WorkerThreads import shutDownQueues
         shutDownQueues()
         logger.error("Shutting Down Repository_runtime")
         from Ganga.Runtime import Repository_runtime
         Repository_runtime.shutdown()
     except:
         logger.error("Unable to disable Internal services, they may have already been disabled!")