diff --git a/bin/collector b/bin/collector --- a/bin/collector +++ b/bin/collector @@ -146,8 +146,8 @@ def launch(graph, doLoadTest=False): 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 @@ def main(): 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__': diff --git a/light9/collector/collector.py b/light9/collector/collector.py --- a/light9/collector/collector.py +++ b/light9/collector/collector.py @@ -103,7 +103,8 @@ class Collector(Generic[ClientType, Clie 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)