Beispiel #1
0
 def __init__(self):
     self.jobs = collections.MappingCollection('jobs')
     self.proxy = proxy.CollectionProxy(self.jobs.itervalues, [
         proxy.func_proxy('request_shutdown', iteration.list_all),
         proxy.func_proxy('enable', iteration.list_all),
         proxy.func_proxy('disable', iteration.list_all),
         proxy.func_proxy('schedule', iteration.list_all),
         proxy.attr_proxy('is_shutdown', all)
     ])
Beispiel #2
0
 def __init__(self):
     self.jobs = collections.MappingCollection('jobs')
     self.proxy = proxy.CollectionProxy(self.jobs.itervalues, [
         proxy.func_proxy('request_shutdown',    iteration.list_all),
         proxy.func_proxy('enable',              iteration.list_all),
         proxy.func_proxy('disable',             iteration.list_all),
         proxy.func_proxy('schedule',            iteration.list_all),
         proxy.attr_proxy('is_shutdown',         all)
     ])
Beispiel #3
0
 def __init__(self):
     self.jobs = collections.MappingCollection('jobs')
     self.proxy = proxy.CollectionProxy(
         self.jobs.values,
         [
             proxy.func_proxy('enable', lambda seq: all(list(seq))),
             proxy.func_proxy('disable', lambda seq: all(list(seq))),
             proxy.func_proxy('schedule', lambda seq: all(list(seq))),
             proxy.func_proxy('run_queue_schedule', lambda seq: all(list(seq))),
         ],
     )
Beispiel #4
0
 def __init__(self):
     self.jobs = collections.MappingCollection('jobs')
     self.proxy = proxy.CollectionProxy(
         lambda: six.itervalues(self.jobs),
         [
             proxy.func_proxy('enable', iteration.list_all),
             proxy.func_proxy('disable', iteration.list_all),
             proxy.func_proxy('schedule', iteration.list_all),
             proxy.func_proxy('run_queue_schedule', iteration.list_all),
         ],
     )
Beispiel #5
0
    def __init__(self, config, node_pool, context):
        self.config             = config
        self.node_pool          = node_pool
        self.instances          = []
        self.context            = context

        self.instances_proxy    = proxy.CollectionProxy(
            lambda: self.instances, [
                proxy.func_proxy('stop',    iteration.list_all),
                proxy.func_proxy('start',   iteration.list_all),
                proxy.func_proxy('restore', iteration.list_all),
                proxy.attr_proxy('state_data', list)
            ])
Beispiel #6
0
    def __init__(self, config, node_pool, context):
        self.config = config
        self.node_pool = node_pool
        self.instances = []
        self.context = context

        self.instances_proxy = proxy.CollectionProxy(lambda: self.instances, [
            proxy.func_proxy('stop', iteration.list_all),
            proxy.func_proxy('kill', iteration.list_all),
            proxy.func_proxy('start', iteration.list_all),
            proxy.func_proxy('restore', iteration.list_all),
            proxy.attr_proxy('state_data', list)
        ])
Beispiel #7
0
 def __init__(self, action_graph, run_map):
     self.action_graph = action_graph
     self.run_map = run_map
     # Setup proxies
     self.proxy_action_runs_with_cleanup = proxy.CollectionProxy(
         self.get_action_runs_with_cleanup,
         [
             proxy.attr_proxy('is_running', any),
             proxy.attr_proxy('is_starting', any),
             proxy.attr_proxy('is_scheduled', any),
             proxy.attr_proxy('is_cancelled', any),
             proxy.attr_proxy('is_active', any),
             proxy.attr_proxy('is_queued', all),
             proxy.attr_proxy('is_complete', all),
             proxy.func_proxy('queue', iteration.list_all),
             proxy.func_proxy('cancel', iteration.list_all),
             proxy.func_proxy('success', iteration.list_all),
             proxy.func_proxy('fail', iteration.list_all),
             proxy.func_proxy('ready', iteration.list_all),
             proxy.func_proxy('cleanup', iteration.list_all),
             proxy.func_proxy('stop', iteration.list_all),
             proxy.attr_proxy('start_time', iteration.min_filter),
             proxy.attr_proxy('state_data', iteration.list_all),
         ],
     )
Beispiel #8
0
 def __init__(self, action_graph, run_map):
     self.action_graph = action_graph
     self.run_map = run_map
     # Setup proxies
     self.proxy_action_runs_with_cleanup = proxy.CollectionProxy(
         self.get_action_runs_with_cleanup,
         [
             proxy.attr_proxy('is_running', any),
             proxy.attr_proxy('is_starting', any),
             proxy.attr_proxy('is_scheduled', any),
             proxy.attr_proxy('is_cancelled', any),
             proxy.attr_proxy('is_active', any),
             proxy.attr_proxy('is_queued', all),
             proxy.attr_proxy('is_complete', all),
             proxy.func_proxy('queue', eager_all),
             proxy.func_proxy('cancel', eager_all),
             proxy.func_proxy('success', eager_all),
             proxy.func_proxy('fail', eager_all),
             proxy.func_proxy('ready', eager_all),
             proxy.func_proxy('cleanup', eager_all),
             proxy.func_proxy('stop', eager_all),
             proxy.attr_proxy('start_time', min_filter),
             proxy.attr_proxy('state_data', eager_all),
         ],
     )