Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pod_thr_sched2.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import queue
import random
import threading

import string

class JobLogger(object):
def __init__(self, log_path, job_name):
Expand Down Expand Up @@ -290,7 +290,8 @@ class PodScheduler(object):

def __init__(self, pod_name, image, tasks, node_selector,
namespace='default', workers_num=50, log_path='.', verbose=False):
self.pod_name = pod_name
random_str = ''.join(random.choice(string.ascii_lowercase) for x in range(5))
self.pod_name = "{}-{}".format( pod_name, random_str)
self.image = image
self.tasks = tasks
self.node_selector = node_selector
Expand Down