changeset 1799:0bb7b9df12e5

collector warnings and errors. the reactor.crash isn't working. Ignore-this: b7d4a6c08f04c924ffba6112483f9c19
author drewp@bigasterisk.com
date Fri, 08 Jun 2018 03:35:30 +0000
parents 283ce478e60f
children 626a79891061
files bin/collector light9/collector/collector.py
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bin/collector	Fri Jun 08 03:35:14 2018 +0000
+++ b/bin/collector	Fri Jun 08 03:35:30 2018 +0000
@@ -146,8 +146,8 @@
             Udmx(L9['output/dmxA/'], bus=4, numChannels=80),
             Udmx(L9['output/dmxB/'], bus=5, numChannels=510),
         ]
-    except Exception as e:
-        log.error("setting up outputs: %r", e)
+    except Exception:
+        log.error("setting up outputs:")
         traceback.print_exc()
         raise
     listeners = WebListeners()
@@ -192,7 +192,7 @@
     
     graph = SyncedGraph(networking.rdfdb.url, "collector")
 
-    graph.initiallySynced.addCallback(lambda _: launch(graph, options.loadtest)).addErrback(log.error)
+    graph.initiallySynced.addCallback(lambda _: launch(graph, options.loadtest)).addErrback(lambda e: reactor.crash())
     reactor.run()
 
 if __name__ == '__main__':
--- a/light9/collector/collector.py	Fri Jun 08 03:35:14 2018 +0000
+++ b/light9/collector/collector.py	Fri Jun 08 03:35:30 2018 +0000
@@ -103,7 +103,8 @@
 
     def _warnOnLateRequests(self, client, now, sendTime):
         requestLag = now - sendTime
-        if requestLag > .1 and now > self.initTime + 10:
+        if requestLag > .1 and now > self.initTime + 10 and getattr(self, '_lastWarnTime', 0) < now - 3:
+            self._lastWarnTime = now
             log.warn('collector.setAttrs from %s is running %.1fms after the request was made',
                      client, requestLag * 1000)