def test_get_marathon_clients_from_config(): with mock.patch("paasta_tools.deployd.common.load_system_paasta_config", autospec=True), mock.patch( "paasta_tools.deployd.common.get_marathon_servers", autospec=True), mock.patch( "paasta_tools.deployd.common.get_marathon_clients", autospec=True) as mock_marathon_clients: assert get_marathon_clients_from_config( ) == mock_marathon_clients.return_value
def __init__( self, instances_to_bounce: DelayDeadlineQueueProtocol, cluster: str, config: SystemPaastaConfig, **kwargs: Any, ) -> None: super().__init__(instances_to_bounce, cluster, config) self.draining: Set[str] = set() self.marathon_clients = get_marathon_clients_from_config()
def __init__(self) -> None: super().__init__() self.started = False self.daemon = True service_configuration_lib.disable_yaml_cache() self.config = load_system_paasta_config() self.setup_logging() self.metrics = get_metrics_interface("paasta.deployd") self.setup_instances_to_bounce() self.control = PaastaQueue("ControlQueue") self.marathon_clients = get_marathon_clients_from_config()
def __init__(self): super(DeployDaemon, self).__init__() self.started = False self.daemon = True service_configuration_lib.disable_yaml_cache() self.config = load_system_paasta_config() self.setup_logging() self.bounce_q = DedupedPriorityQueue("BounceQueue") self.inbox_q = PaastaQueue("InboxQueue") self.control = PaastaQueue("ControlQueue") self.inbox = Inbox(self.inbox_q, self.bounce_q) self.marathon_clients = get_marathon_clients_from_config()
def __init__(self): super().__init__() self.started = False self.daemon = True service_configuration_lib.disable_yaml_cache() self.config = load_system_paasta_config() self.setup_logging() self.instances_to_bounce_now = DedupedPriorityQueue("instances_to_bounce_now") self.instances_to_bounce_later = PaastaQueue("instances_to_bounce_later") # noqa: E501 self.control = PaastaQueue("ControlQueue") self.inbox = Inbox( self.instances_to_bounce_later, self.instances_to_bounce_now, ) self.marathon_clients = get_marathon_clients_from_config()
def my_init(self, filewatcher): self.filewatcher = filewatcher self.marathon_clients = get_marathon_clients_from_config()
def my_init(self, filewatcher): self.filewatcher = filewatcher self.public_config = load_system_paasta_config() self.marathon_clients = get_marathon_clients_from_config()
def __init__(self, inbox_q, cluster, config, **kwargs): super().__init__(inbox_q, cluster, config) self.draining: Set[str] = set() self.marathon_clients = get_marathon_clients_from_config()
def my_init(self, filewatcher: SoaFileWatcher) -> None: self.filewatcher = filewatcher self.marathon_clients = get_marathon_clients_from_config()
def __init__(self, instances_that_need_to_be_bounced_in_the_future, cluster, config, **kwargs): super().__init__(instances_that_need_to_be_bounced_in_the_future, cluster, config) self.draining: Set[str] = set() self.marathon_clients = get_marathon_clients_from_config()