Пример #1
0
 def __init__(self, env, req=None, project_id=None):
     DependencyMount.__init__(self,
                              parent=env,
                              scope='operation',
                              descriptor_type=CurrentOperation)
     self.req = req
     self.project_id = project_id
Пример #2
0
    def __init__(self, env):
        DependencyMount.__init__(self, parent=env)
        self.app = web.Application()
        self.shutdown_timeout = env.get_config('apiserver.shutdown_timeout')

        for endpoint_cls in get_endpoints():
            endpoint_cls.register_with_server(self)
Пример #3
0
 def __init__(self, config=None):
     DependencyMount.__init__(self,
         scope='env',
         descriptor_type=CurrentEnvironment,
         synchronized=True
     )
     if config is None:
         config = discover_config()
     self.config = merge(CONFIG_DEFAULTS, config)
Пример #4
0
    def __init__(self, env, seed=None, epoch=None):
        DependencyMount.__init__(self, parent=env)

        if epoch is None:
            epoch = time.time()
        if seed is None:
            seed = time.time()

        self.epoch = epoch
        self.seed = seed
        self.random = random.Random(seed)
Пример #5
0
 def __init__(self, op):
     DependencyMount.__init__(self, parent=op)
Пример #6
0
 def __init__(self, op):
     DependencyMount.__init__(self,
                              parent=op,
                              descriptor_type=CurrentEndpoint)
Пример #7
0
 def __init__(self, env):
     DependencyMount.__init__(self, parent=env)
     self.producer = SyncProducer(env.get_config('kafka'))
Пример #8
0
 def __init__(self, env):
     DependencyMount.__init__(self, parent=env)
Пример #9
0
 def __init__(self, operation, name):
     DependencyMount.__init__(self, parent=operation)
     self.name = name
Пример #10
0
 def __init__(self, env):
     DependencyMount.__init__(self, parent=env)
     self.ttl = self.env.get_config('recorder.ttl')
     self.resolutions = self.env.get_config('recorder.resolutions')
     self.batch_size = self.env.get_config('recorder.batch_size')
Пример #11
0
 def __init__(self, op, optional):
     DependencyMount.__init__(self, parent=op)
     self.op = op
     self.optional = optional