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