Changeset - 4b9997ab0e4f
[Not reviewed]
default
0 4 0
Drew Perttula - 12 years ago 2013-06-10 09:58:59
drewp@bigasterisk.com
push some logs down to debug. -v flag on SC. another tripleFilter optimization
Ignore-this: 41de7e838ff6c775ee4e350f4dfa141d
4 files changed with 11 insertions and 7 deletions:
0 comments (0 inline, 0 general)
bin/subcomposer
Show inline comments
 
@@ -109,9 +109,9 @@ class Subcomposer(tk.Frame):
 
            graph.patchObject(self.session,
 
                              self.session, L9['currentSub'], newSub.uri)
 

	
 
            with graph.currentState() as current:
 
                
 
                if newSub and (newSub.uri, RDF.type, L9['LocalSubmaster']) in current:
 
            localStmt = (newSub.uri, RDF.type, L9['LocalSubmaster'])
 
            with graph.currentState(tripleFilter=localStmt) as current:
 
                if newSub and localStmt in current:
 
                    self._currentChoice(Local)
 
                else:
 
                    # i think right here is the point that the last local
 
@@ -196,9 +196,13 @@ if __name__ == "__main__":
 
    parser = OptionParser(usage="%prog [suburi]")
 
    parser.add_option('--no-geometry', action='store_true',
 
                      help="don't save/restore window geometry")
 
    parser.add_option('-v', action='store_true', help="log debug level")
 

	
 
    clientsession.add_option(parser)
 
    opts, args = parser.parse_args()
 

	
 
    log.setLevel(logging.DEBUG if opts.v else logging.INFO)
 
    
 
    root=tk.Tk()
 
    root.config(bg='black')
 
    root.tk_setPalette("#004633")
light9/Submaster.py
Show inline comments
 
@@ -148,11 +148,11 @@ class PersistentSubmaster(Submaster):
 
        self.name = self.graph.label(self.uri)
 

	
 
    def setLevels(self):
 
        log.info("sub update levels")
 
        log.debug("sub update levels")
 
        oldLevels = getattr(self, 'levels', {}).copy()
 
        self.setLevelsFromGraph()
 
        if oldLevels != self.levels:
 
            log.info("sub %s changed" % self.name)
 
            log.debug("sub %s changed" % self.name)
 
            # dispatcher too? this would help subcomposer
 
            dispatcher.send("sub levels changed", sub=self)
 

	
light9/rdfdb/patchsender.py
Show inline comments
 
@@ -41,7 +41,7 @@ class PatchSender(object):
 
        if not self._patchesToSend or self._currentSendPatchRequest:
 
            return
 
        if len(self._patchesToSend) > 1:
 
            log.info("%s patches left to send", len(self._patchesToSend))
 
            log.debug("%s patches left to send", len(self._patchesToSend))
 
            # this is where we could concatenate little patches into a
 
            # bigger one. Often, many statements will cancel each
 
            # other out. not working yet:
light9/rdfdb/syncedgraph.py
Show inline comments
 
@@ -106,7 +106,7 @@ class SyncedGraph(CurrentStateGraphApi, 
 
        # these could fail if we're out of sync. One approach:
 
        # Rerequest the full state from the server, try the patch
 
        # again after that, then give up.
 
        log.info("del %s add %s", [q[2] for q in p.delQuads], [q[2] for q in  p.addQuads])
 
        log.debug("del %s add %s", [q[2] for q in p.delQuads], [q[2] for q in  p.addQuads])
 
        try:
 
            patchQuads(self._graph, p.delQuads, p.addQuads, perfect=True)
 
        except ValueError:
0 comments (0 inline, 0 general)