Changeset - a5a44077c54c
[Not reviewed]
default
0 5 0
drewp@bigasterisk.com - 8 years ago 2017-05-10 04:03:54
drewp@bigasterisk.com
docs and error msgs
Ignore-this: 5c451744c5fa08c4560e45e6a90de4bd
5 files changed with 16 insertions and 10 deletions:
0 comments (0 inline, 0 general)
bin/collector
Show inline comments
 
@@ -60,20 +60,23 @@ def startZmq(port, collector):
 
            # attributes in subsequent requests.
 
            client, clientSession, settings, sendTime = parseJsonMessage(message[0])
 
            collector.setAttrs(client, clientSession, settings, sendTime)
 
    s.onPull = onPull
 

	
 
def launch(graph, doLoadTest=False):
 

	
 
    # todo: drive outputs with config files
 
    outputs = [
 
        EnttecDmx(L9['output/dmx0/'], '/dev/dmx0', 80),
 
        Udmx(L9['output/udmx/'], 510),
 
    ]
 
    try:
 
        # todo: drive outputs with config files
 
        outputs = [
 
            #EnttecDmx(L9['output/dmx0/'], '/dev/dmx0', 80),
 
            Udmx(L9['output/udmx/'], 510),
 
        ]
 
    except Exception as e:
 
        log.error("setting up outputs: %r", e)
 
        traceback.print_exc()
 
        raise
 
    c = Collector(graph, outputs)
 

	
 
    server = WebServer(c)
 
    startZmq(networking.collectorZmq.port, c)
 
    
 
    reactor.listenTCP(networking.collector.port,
 
                      Site(server.app.resource()),
 
                      interface='::')
bin/dmxserver
Show inline comments
 
#!bin/python
 
"""
 
Replaced by bin/collector
 

	
 

	
 
this is the only process to talk to the dmx hardware. other clients
 
can connect to this server and present dmx output, and this server
 
will max ('pile-on') all the client requests.
 

	
 
this server has a level display which is the final set of values that
bin/subserver
Show inline comments
 
#!bin/python
 
"""
 
live web display of all existing subs with pictures, mainly for
 
dragging them into CC
 
dragging them into CC or Timeline
 
"""
 
from run_local import log
 
import sys, optparse, logging, json, subprocess, datetime
 
from dateutil.tz import tzlocal
 
from twisted.internet import reactor, defer
 
import cyclone.web, cyclone.httpclient, cyclone.websocket
light9/networking.py
Show inline comments
 
@@ -9,13 +9,14 @@ class ServiceAddress(object):
 

	
 
    def _url(self):
 
        graph = getGraph()
 
        net = graph.value(showUri(), L9['networking'])
 
        ret = graph.value(net, self.service)
 
        if ret is None:
 
            raise ValueError("no url for %s %s" % (showUri(), L9['networking']))
 
            raise ValueError("no url for %s -> %s -> %s" % (showUri(), L9['networking'],
 
                                                            self.service))
 
        return str(ret)
 

	
 
    @property
 
    def port(self):
 
        _, netloc, _, _, _, _ = urlparse(self._url())
 
        host, port = splitport(netloc)
light9/rdfdb/patchreceiver.py
Show inline comments
 
@@ -35,13 +35,13 @@ class PatchReceiver(object):
 
            url=url,
 
            method='POST',
 
            headers={'Content-Type': ['application/x-www-form-urlencoded']},
 
            postdata=body,
 
            ).addCallbacks(self._done,
 
                           lambda err: self._registerError(err, url, body))
 
        log.info("registering with rdfdb")
 
        log.info("registering with rdfdb at %s", url)
 

	
 
    def _registerError(self, err, url, body):
 
        log.error('registering to url=%r body=%r', url, body)
 
        log.error(err)
 
        
 
    def _done(self, x):
0 comments (0 inline, 0 general)