File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
build-resources/geocml-task-scheduler/geocml-task-scheduler Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 66def register_with_drgon ():
77 host = os .environ ["DRGON_HOST" ]
88 api_key = os .environ ["DRGON_API_KEY" ]
9+ deployment_host = os .environ ["GEOCML_DEPLOYMENT_HOST" ]
910
10- if host == "" or api_key == "" :
11+ if host == "" or api_key == "" or deployment_host == "" :
1112 log ("Host or API key not found, can't register this deployment with DRGON." )
1213 return 0
1314
1415 res = requests .get ("http://geocml-server/cgi-bin/qgis_mapserv.fcgi?SERVICE=WFS&VERSION=1.3.0&REQUEST=GetCapabilities" )
1516 xml = bs .BeautifulSoup (res .text , "html.parser" )
1617 abstract = xml .find ("ows:abstract" , text = lambda text : isinstance (text , bs .CData )).string .strip ()
1718 title = xml .find ("ows:title" ).text
18- url = "https://google.com" # TODO: make this dynamic
1919 owner = xml .find ("ows:individualname" ).text
2020 keywords = xml .find ("ows:keywords" ).find_all ("ows:keyword" )
2121 tags = ""
@@ -26,7 +26,7 @@ def register_with_drgon():
2626 res = requests .post (f"{ host } /registry" , json = {
2727 "title" : title ,
2828 "description" : abstract ,
29- "url" : url ,
29+ "url" : deployment_host ,
3030 "owner" : owner ,
3131 "tags" : tags ,
3232 "key" : api_key
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ services:
1111 PATH : /geocml-task-scheduler/tabor/dist/tabor:$PATH
1212 DRGON_API_KEY : ${DRGON_API_KEY}
1313 DRGON_HOST : ${DRGON_HOST}
14+ GEOCML_DEPLOYMENT_HOST : ${GEOCML_DEPLOYMENT_HOST}
1415 networks :
1516 - geocml-network
1617 volumes :
You can’t perform that action at this time.
0 commit comments