Last change
on this file since 981 was
968,
checked in by djay, 4 years ago
|
Add websocketd container to docker-compose and make the OGC API - Processes and it basic UI available.
|
-
Property svn:executable set to
*
|
File size:
634 bytes
|
Line | |
---|
1 | #!/usr/bin/python3 |
---|
2 | import os |
---|
3 | import sys |
---|
4 | import redis |
---|
5 | data = sys.stdin.read(); |
---|
6 | |
---|
7 | print('Content-Type: text/html') |
---|
8 | print('') |
---|
9 | print('Environment variables') |
---|
10 | for param in os.environ.keys(): |
---|
11 | print ("<b>%20s</b>: %s<br/>" % (param, os.environ[param])) |
---|
12 | |
---|
13 | print(data) |
---|
14 | |
---|
15 | from urllib import parse |
---|
16 | |
---|
17 | try: |
---|
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) |
---|
26 | except Exception as e: |
---|
27 | print(e) |
---|
28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.