Last change
on this file since 964 was
962,
checked in by djay, 4 years ago
|
Update OGC API - Processes documentation and implementation, providing a browsable User Interface to Processes.
|
-
Property svn:executable set to
*
|
File size:
485 bytes
|
Rev | Line | |
---|
[962] | 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 | 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) |
---|
| 21 | except Exception as e: |
---|
| 22 | print(e) |
---|
| 23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.