diff --git a/pnut-bridge.py b/pnut-bridge.py index c032f74..72a9cbb 100644 --- a/pnut-bridge.py +++ b/pnut-bridge.py @@ -109,6 +109,7 @@ class ChannelMonitor(threading.Thread): def poll_channel(self, room): try: r = Pnut(app.config['MATRIX_PNUT_TOKEN']).get_channel_stream(room.pnut_chan, room.pnut_since) + # print(r.headers['X-RateLimit-Remaining'], r.headers['X-RateLimit-Reset']) except requests.exceptions.ConnectionError: logging.info('*** Problem connecting to pnut.io! Waiting to retry. ***') time.sleep(30) @@ -187,7 +188,8 @@ class ChannelMonitor(threading.Thread): rooms = MatrixRoom2.query.all() for r in rooms: self.poll_channel(r) - time.sleep(15) + time.sleep(1) + time.sleep(1.5) logging.info("-- Stopping channel monitor --") if __name__ == '__main__':