cbd6dc824d52df1630fc0419830a2fc38d8c210f,polyaxon/sidecar/sidecar/__main__.py,,,#,13

Before Change


    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    client = PolyaxonClient()
    client.set_internal_health_check()
    while is_running(k8s_manager, pod_id):
        time.sleep(5)
    // is_running, labels = monitor.can_log(k8s_manager, pod_id, log_sleep_interval)
    //
    // if not is_running:
    //     monitor.logger.info("Pod is not running anymore.")

After Change


    arguments = args.__dict__

    pod_id = arguments.pop("pod_id")
    container_name = arguments.pop("container_name")
    app_label = arguments.pop("app_label")
    log_sleep_interval = arguments.pop("log_sleep_interval")

    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    client = PolyaxonClient()
    client.set_internal_health_check()
    retry = 0
    is_running = True
    while is_running and retry < 3:
        try:
            is_running = is_pod_running(k8s_manager, pod_id, container_name)
        except ApiException:
            retry += 1
        time.sleep(log_sleep_interval)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: polyaxon/polyaxon
Commit Name: cbd6dc824d52df1630fc0419830a2fc38d8c210f
Time: 2018-12-15
Author: mouradmourafiq@gmail.com
File Name: polyaxon/sidecar/sidecar/__main__.py
Class Name:
Method Name:


Project Name: pantsbuild/pants
Commit Name: cd263663b3332ac10da6721dee8f52804639f19b
Time: 2014-10-01
Author: benjyw@gmail.com
File Name: src/python/pants/option/arg_splitter.py
Class Name: ArgSplitter
Method Name: split_args


Project Name: GoogleCloudPlatform/ml-on-gcp
Commit Name: 06b9fdb0079116af3e79021a4fb27a2caac1ad97
Time: 2018-01-24
Author: yuhanliu@google.com
File Name: sklearn/hpsearch/gke_parallel.py
Class Name: GKEParallel
Method Name: _partition_search_spaces