Mercurial > code > home > repos > homeauto
changeset 1414:1a277dba4cdc
oneShot can send to a dev instance
Ignore-this: 37dfe0f67c01c221b861d2b3e3900051
darcs-hash:85955653cb2158901ccdc4bd204c78a2b0cf54c2
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Wed, 24 Jul 2019 01:03:21 -0700 |
parents | 14802ffc9e44 |
children | a02b1b08f24f |
files | service/reasoning/oneShot |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/service/reasoning/oneShot Wed Jul 24 01:02:31 2019 -0700 +++ b/service/reasoning/oneShot Wed Jul 24 01:03:21 2019 -0700 @@ -3,7 +3,7 @@ send a statement to the reasoning server for one update cycle. Args are s/p/o in n3 notation, with many prefixes predefined here. """ -import sys, requests, time +import sys, requests, time, os s, p, o = sys.argv[1:] prefixes = { @@ -26,7 +26,7 @@ t1 = time.time() ret = requests.post( - 'http://bang:9071/oneShot', + 'http://%s/oneShot' % os.environ.get('REASONING', 'bang:9071'), headers={"content-type": "text/n3"}, data=stmt.encode('ascii')) g = float(ret.headers['x-graph-ms'])