Mercurial > code > home > repos > homeauto
changeset 77:b19f137702d5
keep hacking reasoning to handle my output actions
Ignore-this: c9c6db3d640fa79a765c1d473dd0fc0a
author | drewp@bigasterisk.com |
---|---|
date | Wed, 29 May 2013 00:34:09 -0700 |
parents | 6c409d29b3e9 |
children | 0fa988159bb3 |
files | service/reasoning/reasoning.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/service/reasoning/reasoning.py Wed May 29 00:33:45 2013 -0700 +++ b/service/reasoning/reasoning.py Wed May 29 00:34:09 2013 -0700 @@ -281,11 +281,18 @@ # nothing in this actually makes them one-shot yet. they'll # just fire as often as we get in here, which is not desirable for s, p in [ - (URIRef('http://bigasterisk.com/host/star/slideshow'), ROOM.postAction), + (URIRef('http://bigasterisk.com/host/star/slideshow'), ROOM.postAction), + (URIRef('http://bigasterisk.com/host/star/sound'), ROOM.postAction), + (URIRef('http://bigasterisk.com/host/slash/sound'), ROOM.postAction), ]: + log.info("find inferred objs %r %r" % (s, p)) for postTarget in inferred.objects(s, p): + log.info("post target %r", postTarget) sendToLiveClients({"s":s, "p":p, "o":postTarget}) - if 0: + if s in [URIRef('http://bigasterisk.com/host/star/sound'), + URIRef('http://bigasterisk.com/host/slash/sound'), + URIRef('http://bigasterisk.com/host/star/slideshow'), + ]: try: response = restkit.request(url=postTarget, method="POST", body="") except Exception, e: