Skip to content

Commit

Permalink
Merge pull request #72 from citysciencelab/use-uuid
Browse files Browse the repository at this point in the history
Use UUID instead of randomly generated names for ensemble jobs
  • Loading branch information
hwbllmnn authored Nov 5, 2024
2 parents de26c86 + e1e55c7 commit 4272b4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 47 deletions.
48 changes: 4 additions & 44 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ python-keycloak = "^4.3.0"
sqlalchemy-serializer = "^1.4.22"
watchdog = "^5.0.3"
ema-workbench = "^2.5.2"
names-generator = "^0.2.0"
ipyparallel = "^8.8.0"
schedule = "^1.2.2"

Expand Down
4 changes: 2 additions & 2 deletions src/ump/api/routes/ensembles.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import copy
import json
import logging
from uuid import uuid1

from apiflask import APIBlueprint
from ema_workbench import CategoricalParameter, RealParameter
Expand All @@ -15,7 +16,6 @@
sample_parameters,
)
from flask import Response, g, request
from names_generator import generate_name
from sqlalchemy import create_engine, delete, or_, select
from sqlalchemy.orm import Session

Expand Down Expand Up @@ -435,7 +435,7 @@ def create_jobs(ensemble: Ensemble, auth):
result_list = []
for config in results:
process = Process(config["process_id"])
job_name = ensemble.name + " - " + generate_name(style="plain")
job_name = ensemble.name + " - " + str(uuid1())
result_list.append(
process.execute(
{"job_name": f"{job_name}", "inputs": config["inputs"]},
Expand Down

0 comments on commit 4272b4b

Please sign in to comment.