# HG changeset patch # User drewp@bigasterisk.com # Date 1563955401 25200 # Node ID 0996e3a91c852ddf592fa4d3440ce67173a748de # Parent 8be164bc3826294d7f84db6549c1fa41e55a6533 oneShot can send to a dev instance Ignore-this: 37dfe0f67c01c221b861d2b3e3900051 diff -r 8be164bc3826 -r 0996e3a91c85 service/reasoning/oneShot --- 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'])