Commit 4852a2c 1 parent e786c35 commit 4852a2c Copy full SHA for 4852a2c
File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
[DEFAULT]
2
2
ARGO_ACCESS_METHOD = access
3
3
ARGO_HOST = http://argo-argo-workflows-server.argo.svc.cluster.local:2746
4
+ COHORT_DEFINITION_BY_SOURCE_AND_TEAM_PROJECT_URL = http://cohort-middleware-service/cohortdefinition-stats/by-source-id/{}/by-team-project?team-project ={}
Original file line number Diff line number Diff line change 1
1
import requests
2
2
from argowrapper import logger
3
+ from argowrapper .constants import (
4
+ COHORT_DEFINITION_BY_SOURCE_AND_TEAM_PROJECT_URL ,
5
+ )
3
6
4
7
5
8
def get_cohort_ids_for_team_project (token , source_id , team_project ):
6
9
header = {"Authorization" : token , "cookie" : "fence={}" .format (token )}
7
- url = "http://cohort-middleware-service/cohortdefinition-stats/by-source-id/{}/by-team-project?team-project={}" .format (
10
+ url1 = "http://cohort-middleware-service/cohortdefinition-stats/by-source-id/{}/by-team-project?team-project={}" .format (
11
+ source_id , team_project
12
+ )
13
+ url = COHORT_DEFINITION_BY_SOURCE_AND_TEAM_PROJECT_URL .format (
8
14
source_id , team_project
9
15
)
10
-
11
16
try :
12
17
r = requests .get (url = url , headers = header )
13
18
r .raise_for_status ()
Original file line number Diff line number Diff line change 20
20
logger .info (f"Access method: { config ['DEFAULT' ]['ARGO_ACCESS_METHOD' ]} " )
21
21
22
22
ARGO_HOST : Final = config ["DEFAULT" ]["ARGO_HOST" ]
23
+ COHORT_DEFINITION_BY_SOURCE_AND_TEAM_PROJECT_URL : Final = config ["DEFAULT" ][
24
+ "COHORT_DEFINITION_BY_SOURCE_AND_TEAM_PROJECT_URL"
25
+ ]
23
26
TEST_WF : Final = "test.yaml"
24
27
WF_HEADER : Final = "header.yaml"
25
28
ARGO_NAMESPACE : Final = "argo"
You can’t perform that action at this time.
0 commit comments