changeset 882:1e2a3f85c61a

keep hacking reasoning to handle my output actions Ignore-this: c9c6db3d640fa79a765c1d473dd0fc0a darcs-hash:20130529073409-312f9-c86d0cb2ec5aae6b65f826994b4926061df6f696
author drewp <drewp@bigasterisk.com>
date Wed, 29 May 2013 00:34:09 -0700
parents ed5349f5bfdb
children 27805f8d3354
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: