mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use generated uuid instead of galaxy job id for k8s job name
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
This commit is contained in:
co-authored by
Marius van den Beek
parent
3b427177fc
commit
488baee52a
@@ -1,9 +1,7 @@
|
||||
"""Interface layer for pykube library shared between Galaxy and Pulsar."""
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import uuid
|
||||
|
||||
try:
|
||||
@@ -59,9 +57,7 @@ def produce_unique_k8s_job_name(app_prefix=None, instance_id=None, job_id=None):
|
||||
if instance_id and len(instance_id) > 0:
|
||||
job_name += "%s-" % instance_id
|
||||
|
||||
unique_id = ''.join(random.choices(string.ascii_lowercase, k=4))
|
||||
|
||||
return job_name + job_id + "-" + unique_id
|
||||
return "{}{}-{}".format(job_name, job_id, uuid.uuid4())
|
||||
|
||||
|
||||
def pull_policy(params):
|
||||
|
||||
Reference in New Issue
Block a user