Exemplo n.º 1
0
    def test_0_testRegistryAsserts(self):
        from Ganga.GPI import jobs, box, tasks, prep
        from Ganga.GPIDev.Base.Proxy import stripProxy
        from Ganga.Core.GangaRepository import getRegistryProxy, getRegistrySlice, getRegistry
        assert getRegistryProxy('jobs') is jobs
        assert getRegistryProxy('box') is box
        assert getRegistryProxy('tasks') is tasks
        assert getRegistryProxy('prep') is prep

        assert getRegistrySlice('jobs') is stripProxy(jobs)
        assert getRegistrySlice('box') is stripProxy(box)
        assert getRegistrySlice('tasks') is stripProxy(tasks)
        assert getRegistrySlice('prep') is stripProxy(prep)

        assert getRegistry('jobs') is stripProxy(jobs).objects
        assert getRegistry('tasks') is stripProxy(tasks).objects
        assert getRegistry('box') is stripProxy(box).objects
Exemplo n.º 2
0
    def test_0_testRegistryAsserts(self):
        from Ganga.GPI import jobs, box, tasks, prep
        from Ganga.GPIDev.Base.Proxy import stripProxy
        from Ganga.Core.GangaRepository import getRegistryProxy, getRegistrySlice, getRegistry
        assert getRegistryProxy('jobs') is jobs
        assert getRegistryProxy('box') is box
        assert getRegistryProxy('tasks') is tasks
        assert getRegistryProxy('prep') is prep

        assert getRegistrySlice('jobs') is stripProxy(jobs)
        assert getRegistrySlice('box') is stripProxy(box)
        assert getRegistrySlice('tasks') is stripProxy(tasks)
        assert getRegistrySlice('prep') is stripProxy(prep)

        assert getRegistry('jobs') is stripProxy(jobs).objects
        assert getRegistry('tasks') is stripProxy(tasks).objects
        assert getRegistry('box') is stripProxy(box).objects
Exemplo n.º 3
0
startUpQueues(ganga)

# ------------------------------------------------------------------------------------
# set the default value for the plugins

from Ganga.Utility.Runtime import setPluginDefaults
setPluginDefaults(ganga)

from Ganga.Runtime.bootstrap import manualExportToGPI
manualExportToGPI(ganga)

## Registries now add themselves to the Interface in this step
from Ganga.Runtime.Repository_runtime import startUpRegistries
startUpRegistries(ganga)

# ------------------------------------------------------------------------------------
#  bootstrap core modules
interactive = False
from Ganga.Core.GangaRepository import getRegistrySlice
Ganga.Core.bootstrap(getRegistrySlice('jobs'), interactive, my_interface=ganga)
Ganga.GPIDev.Lib.Config.bootstrap()

# ------------------------------------------------------------------------------------
# run post bootstrap hooks
for r in allRuntimes.values():
    try:
        r.postBootstrapHook()
    except Exception as err:
        logger.error("problems with post bootstrap hook for %s" % r.name)
        logger.error("Reason: %s" % str(err))
Exemplo n.º 4
0
# set the default value for the plugins

from Ganga.Utility.Runtime import setPluginDefaults
setPluginDefaults(ganga)


from Ganga.Runtime.bootstrap import manualExportToGPI
manualExportToGPI(ganga)


## Registries now add themselves to the Interface in this step
from Ganga.Runtime.Repository_runtime import startUpRegistries
startUpRegistries(ganga)

# ------------------------------------------------------------------------------------
#  bootstrap core modules
interactive = False
from Ganga.Core.GangaRepository import getRegistrySlice
Ganga.Core.bootstrap(getRegistrySlice('jobs'), interactive, my_interface=ganga)
Ganga.GPIDev.Lib.Config.bootstrap()

# ------------------------------------------------------------------------------------
# run post bootstrap hooks
for r in allRuntimes.values():
    try:
        r.postBootstrapHook()
    except Exception as err:
        logger.error("problems with post bootstrap hook for %s" % r.name)
        logger.error("Reason: %s" % str(err))