Example #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
Example #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)
Example #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)
Example #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)
Example #5
0
 def __init__(self, op):
     DependencyMount.__init__(self, parent=op)
Example #6
0
 def __init__(self, op):
     DependencyMount.__init__(self,
                              parent=op,
                              descriptor_type=CurrentEndpoint)
Example #7
0
 def __init__(self, env):
     DependencyMount.__init__(self, parent=env)
     self.producer = SyncProducer(env.get_config('kafka'))
Example #8
0
 def __init__(self, env):
     DependencyMount.__init__(self, parent=env)
Example #9
0
 def __init__(self, operation, name):
     DependencyMount.__init__(self, parent=operation)
     self.name = name
Example #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')
Example #11
0
 def __init__(self, op, optional):
     DependencyMount.__init__(self, parent=op)
     self.op = op
     self.optional = optional