File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1212 - Added ` ts_index ` and ` pretty_ts_index ` properties for records in Python which provides the timestamp that is most appropriate for indexing
1313 - Fixed type stub for ` channel_id ` to allow None
1414
15+ #### Enhancements
16+ - Reduced the log level of ` SystemMsg ` records in the ` Live ` client to debug
17+ - Increased the log level of ` SystemMsg ` records with the code ` SystemCode.SLOW_READER_WARNING ` to warning
18+
1519#### Bug fixes
1620- Fixed type hint for ` start ` parameter in ` Live.subscribe() `
1721
Original file line number Diff line number Diff line change 77from typing import Final
88
99import databento_dbn
10+ from databento_dbn import DBNError
1011from databento_dbn import Metadata
1112from databento_dbn import Schema
1213from databento_dbn import SType
14+ from databento_dbn import SystemCode
1315from databento_dbn import VersionUpgradePolicy
1416
1517from databento .common import cram
@@ -380,10 +382,19 @@ def _process_dbn(self, data: bytes) -> None:
380382 if record .is_heartbeat ():
381383 logger .debug ("gateway heartbeat" )
382384 else :
383- logger .info (
384- "gateway message: %s" ,
385- record .msg ,
386- )
385+ try :
386+ msg_code = record .code
387+ except DBNError :
388+ msg_code = None
389+ if msg_code == SystemCode .SLOW_READER_WARNING :
390+ logger .warning (
391+ record .msg ,
392+ )
393+ else :
394+ logger .debug (
395+ "gateway message: %s" ,
396+ record .msg ,
397+ )
387398 self .received_record (record )
388399
389400 def _process_gateway (self , data : bytes ) -> None :
You can’t perform that action at this time.
0 commit comments