From 990f60e0406341b89a2c3ad8dbb6f79dfdf6dea7 Mon Sep 17 00:00:00 2001
From: Remi Planel <rplanel@pasteur.fr>
Date: Mon, 4 Oct 2021 11:56:32 +0200
Subject: [PATCH] prefix galaxy history with hostlabel value

---
 server/api/tasks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/api/tasks.py b/server/api/tasks.py
index 937eefdc..5d0ad4eb 100644
--- a/server/api/tasks.py
+++ b/server/api/tasks.py
@@ -4,7 +4,7 @@ from pathlib import Path
 import shutil
 from celery import chain
 from requests.exceptions import HTTPError
-
+from django.conf import settings
 from server import celery_app
 
 from .models import (
@@ -32,7 +32,7 @@ def run_analyis(
     # current_history = gi.histories.create_history()
     # history_id = current_history["id"]
     chained_tasks = chain(
-        create_history.si(f"{project_name} - {analysis_name}", analysis_id),
+        create_history.si(f"{settings.HOSTLABEL} - {project_name} - {analysis_name}", analysis_id),
         upload_file_to_galaxy.s(experiment_file_path, "excel.xls",),
         genome_scan_wf.s(tools_params, wf_id),
         load_lod_score.s(),
-- 
GitLab