From b702bc848e727332e5e2054dde6c6536f4e3a3a1 Mon Sep 17 00:00:00 2001
From: Matthieu Imbert <matthieu.imbert@inria.fr>
Date: Tue, 18 Mar 2025 12:42:07 +0100
Subject: [PATCH] [execo_g5k] oar: add -t origin=execo to all jobs

---
 src/execo_g5k/oar.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/execo_g5k/oar.py b/src/execo_g5k/oar.py
index e8bba10..dc9c678 100644
--- a/src/execo_g5k/oar.py
+++ b/src/execo_g5k/oar.py
@@ -210,9 +210,8 @@ def get_oarsub_commandline(job_spec):
         key = os.environ.get('OAR_JOB_KEY_FILE')
     if key != None:
         oarsub_cmdline += ' -k -i %s' % (key,)
-    if job_spec.job_type != None:
-        for t in singleton_to_collection(job_spec.job_type):
-            oarsub_cmdline += ' -t "%s"' % (t,)
+    for t in set(singleton_to_collection(job_spec.job_type) + [ 'origin=execo' ]):
+        oarsub_cmdline += ' -t "%s"' % (t,)
     if job_spec.sql_properties != None:
         oarsub_cmdline += ' -p "%s"' % (job_spec.sql_properties,)
     if job_spec.queue != None:
-- 
GitLab