Skip to content

Commit

Permalink
Adds some todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
pcm32 committed Apr 15, 2016
1 parent 820d33c commit 820913c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/galaxy/jobs/runners/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def __get_job_states(self):

def stop_job( self, job ):
"""Attempts to delete a dispatched job to the k8s cluster"""
# TODO rescale instead of delete the job, as in kubectl scale --replicas=0 jobs/myjob
try:
jobs = Job.objects(self._pykube_api).filter(selector="app="+job.job_runner_external_id)
if jobs.response['items'].len() >= 0:
Expand All @@ -280,6 +281,7 @@ def stop_job( self, job ):

def recover( self, job, job_wrapper ):
"""Recovers jobs stuck in the queued/running state when Galaxy started"""
# TODO this needs to be implemented to override unimplemented base method
job_id = job.get_job_runner_external_id()
if job_id is None:
self.put( job_wrapper )
Expand Down

0 comments on commit 820913c

Please sign in to comment.