# HG changeset patch # User drewp # Date 1563955401 25200 # Node ID 1a277dba4cdc374e42b7970f27c962cabaf01c33 # Parent 14802ffc9e446e39eac3b24ebc94cea4b7b4fb22 oneShot can send to a dev instance Ignore-this: 37dfe0f67c01c221b861d2b3e3900051 darcs-hash:85955653cb2158901ccdc4bd204c78a2b0cf54c2 diff -r 14802ffc9e44 -r 1a277dba4cdc 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'])