Ejemplo n.º 1
0
import ufora.cumulus.distributed.CumulusGatewayRemote as CumulusGatewayRemote
import ufora.cumulus.distributed.CumulusActiveMachines as CumulusActiveMachines

import ufora.distributed.SharedState.Connections.TcpChannelFactory as TcpChannelFactory
import ufora.distributed.SharedState.Connections.ViewFactory as ViewFactory

import ufora.FORA.VectorDataManager.VectorDataManager as VectorDataManager

import ufora.util.OutOfProcessDownloader as OutOfProcessDownloader

import ufora.util.CodeCoverage as CodeCoverage

import ufora.native.CallbackScheduler as CallbackScheduler

WAIT_FOR_RELAY_TERMINATION_TIMEOUT_SECONDS = CodeCoverage.adjusted_timeout(20.0)

WAIT_FOR_SERVICE_TERMINATION_TIMEOUT_SECONDS = CodeCoverage.adjusted_timeout(30.0)

STOP_MESSAGE = "stop\n"


def simulationDirName():
    return os.path.join(Setup.config().fakeAwsBaseDir, time.strftime('%Y%m%d_%H-%M-%S'))

def makeUniqueDir():
    newDirName = simulationDirName()
    i = 0
    while os.path.exists(newDirName):
        newDirName = simulationDirName() + ('-%s' % i)
        i += 1
Ejemplo n.º 2
0
import ufora.cumulus.distributed.CumulusGatewayRemote as CumulusGatewayRemote
import ufora.cumulus.distributed.CumulusActiveMachines as CumulusActiveMachines

import ufora.distributed.SharedState.Connections.TcpChannelFactory as TcpChannelFactory
import ufora.distributed.SharedState.Connections.ViewFactory as ViewFactory

import ufora.FORA.VectorDataManager.VectorDataManager as VectorDataManager

import ufora.util.OutOfProcessDownloader as OutOfProcessDownloader

import ufora.util.CodeCoverage as CodeCoverage

import ufora.native.CallbackScheduler as CallbackScheduler

WAIT_FOR_RELAY_TERMINATION_TIMEOUT_SECONDS = CodeCoverage.adjusted_timeout(
    20.0)

WAIT_FOR_SERVICE_TERMINATION_TIMEOUT_SECONDS = CodeCoverage.adjusted_timeout(
    30.0)

STOP_MESSAGE = "stop\n"


def simulationDirName():
    return os.path.join(Setup.config().fakeAwsBaseDir,
                        time.strftime('%Y%m%d_%H-%M-%S'))


def makeUniqueDir():
    newDirName = simulationDirName()
    i = 0