Skip to content

Commit

Permalink
Style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pcm32 committed Apr 26, 2017
1 parent cc4a37d commit 54c0249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/job_conf.xml.sample_advanced
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
(respecting capitalization). Any other value, such as "Default", will not change the setting on k8s and
leave for the containers to run with the default pull policy specified at the cluster (this is normally
IfNotPresent). Container images using latest are by default always pulled, so you need to use defined
versions for offline cases to work (and images need to be previously pulled).
versions for offline cases to work (and images need to be previously pulled). -->

<param id="k8s_use_service_account">false</param>
<!-- For use when Kubernetes should be accessed from inside a Pod running Galaxy (that is,
Expand Down
12 changes: 4 additions & 8 deletions lib/galaxy/jobs/runners/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ def queue_job(self, job_wrapper):
{
"name": k8s_job_name,
"namespace": "default", # TODO this should be set
"labels": {"app": k8s_job_name},
}
,
"labels": {"app": k8s_job_name}
},
"spec": self.__get_k8s_job_spec(job_wrapper)
}

Expand Down Expand Up @@ -134,7 +133,7 @@ def __get_supplemental_group(self):
return int(self.runner_params["k8s_supplemental_group_id"])
except:
log.warn("Supplemental group passed for Kubernetes runner needs to be an integer, value "
+ self.runner_params["k8s_supplemental_group_id"]+" passed is invalid")
+ self.runner_params["k8s_supplemental_group_id"] + " passed is invalid")
return None
return None

Expand All @@ -144,7 +143,7 @@ def __get_fs_group(self):
return int(self.runner_params["k8s_fs_group_id"])
except:
log.warn("FS group passed for Kubernetes runner needs to be an integer, value "
+ self.runner_params["k8s_fs_group_id"]+" passed is invalid")
+ self.runner_params["k8s_fs_group_id"] + " passed is invalid")
return None
return None

Expand Down Expand Up @@ -223,8 +222,6 @@ def __get_k8s_containers(self, job_wrapper):

if self._default_pull_policy:
k8s_container["imagePullPolicy"] = self._default_pull_policy


# if self.__requires_ports(job_wrapper):
# k8s_container['ports'] = self.__get_k8s_containers_ports(job_wrapper)

Expand Down Expand Up @@ -304,7 +301,6 @@ def check_watched_item(self, job_state):
self.mark_as_failed(job_state)
job.scale(replicas=0)
return None

# We should not get here
log.debug(
"Reaching unexpected point for Kubernetes job, where it is not classified as succ., active nor failed.")
Expand Down

0 comments on commit 54c0249

Please sign in to comment.