Changeset 968 for trunk/zoo-project/zoo-services/utils
- Timestamp:
- Dec 18, 2020, 7:11:27 PM (4 years ago)
- Location:
- trunk/zoo-project/zoo-services/utils/open-api
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-services/utils/open-api/cgi-env/service.py
r962 r968 28 28 def display(conf,inputs,outputs): 29 29 config = configparser.ConfigParser() 30 config.read(conf["lenv"]["cwd"]+'/oas.cfg' )30 config.read(conf["lenv"]["cwd"]+'/oas.cfg',"utf-8") 31 31 nameSpace = {'conf': conf,'inputs': inputs, 'outputs': outputs,"openapi": config} 32 32 t = Template(file=conf["main"]["templatesPath"]+"/index.html",searchList=nameSpace) -
trunk/zoo-project/zoo-services/utils/open-api/server/publish.py
r962 r968 14 14 15 15 from urllib import parse 16 16 17 try: 17 params=parse.parse_qs(os.environ["QUERY_STRING"]) 18 r = redis.Redis(host='localhost', port=6379, db=0) 19 print(params) 20 r.publish(params["jobid"][0],data) 18 params=parse.parse_qs(os.environ["QUERY_STRING"]) 19 r=None 20 if "ZOO_REDIS_HOST" in os.environ: 21 r = redis.Redis(host=os.environ["ZOO_REDIS_HOST"], port=6379, db=0) 22 else: 23 r = redis.Redis(host='redis', port=6379, db=0) 24 print(params) 25 r.publish(params["jobid"][0],data) 21 26 except Exception as e: 22 27 print(e) -
trunk/zoo-project/zoo-services/utils/open-api/server/subscriber.py
r962 r968 11 11 import redis 12 12 import json 13 import os 13 14 14 15 mThreads=[] 15 r = redis.Redis(host='localhost', port=6379, db=0) 16 r=None 17 18 if "ZOO_REDIS_HOST" in os.environ: 19 r = redis.Redis(host=os.environ["ZOO_REDIS_HOST"], port=6379, db=0) 20 else: 21 r = redis.Redis(host='redis', port=6379, db=0) 16 22 17 23 def send(t): … … 59 65 60 66 t0.join() 61 for i in range(len(mThreads)):62 mThreads[i].join()67 #for i in range(len(mThreads)): 68 # mThreads[i].join() -
trunk/zoo-project/zoo-services/utils/open-api/static/openapi.js
r967 r968 108 108 for(var i=0;i < System["JSON_STR"]["outputs"].length;i++){ 109 109 var cOutput={}; 110 console.log($('input[name="oapi_ioAsArray"]').val()=="true"); 110 111 if($('input[name="oapi_ioAsArray"]').val()=="true") 111 cOutput s={"id": System["JSON_STR"]["outputs"][i]["id"]};112 cOutput={"id": System["JSON_STR"]["outputs"][i]["id"]}; 112 113 var cName=System["JSON_STR"]["outputs"][i]["id"].replace(/\./g,"_"); 113 114 if(System["JSON_STR"]["outputs"][i]["output"]["formats"]){
Note: See TracChangeset
for help on using the changeset viewer.