1 """Panda meta-data utilities.
2
3 N.B. This code is under development and should not generally be used or relied upon.
4
5 """
6
7 from Ganga.Lib.MonitoringServices.Dashboard import CommonUtil
8
9
10
11
15
17 """Build execution_backend. Only run on client."""
18 return job.backend._name
19
23
27
31
38
42
44 """Build job_id_inside_the_task. Only run on client."""
45 if job.master is None:
46 job_id_inside_the_task = 0
47 else:
48 job_id_inside_the_task = job.id
49 return job_id_inside_the_task
50
52 """Build task_name. Only run on client."""
53
54 if job.master:
55 job = job.master
56 task_name = 'ganga:%s:%s' % (job.info.uuid, job.name,)
57 return task_name
58
60 """Build unique_job_id. Only run on client."""
61 return job.info.uuid
62
63
64
65
67 """Build dest_ce. Only run on worker node."""
68 return 'Panda_CE'
69
70
71
73 """Build dest_site. Only run on worker node."""
74 return 'Panda_site'
75
76
77
81
83 """Build grid_job_id. Only run on worker node."""
84 """
85 grid_job_id = CommonUtil.env('EDG_WL_JOBID')
86 if not grid_job_id:
87 grid_job_id = CommonUtil.env('GLITE_WMS_JOBID')
88 return grid_job_id
89 """
90 return 'panda_job_id'
91
92