Change order that the engine instantiates the DBBinder and the driver

Skip to first unread message

May 2, 2024, 11:35:48 AMMay 2
to weewx-development
I am experimenting with a driver/service pair that performs a ‘lightweight’ (Not sure a reliable synchronization can be light weight) synchronization of sqlite DBs over MQTT v5. When the driver is instantiated, it retrieves the ‘lastGoodStamp’ from the database. It then makes a MQTT request to the primary DB for all records since that timestamp. By the time genStartupRecords is called, the catchup data should (hopefully) be available. But, the DBBinder has not been instantiated yet. I can get around this using ‘weewx.manager.open_manager’.

I’m wondering if you would be open to a pull request that just moves ‘self.db_binder = weewx.manager.DBBinder(config_dict)’ prior to ‘ self.setupStation(config_dict)? Then when the driver retrieves the db_manager, it would be cached and available to the rest of the WeeWX pipeline/infrastructure.

Thanks. rich

Tom Keffer

May 2, 2024, 11:50:10 AMMay 2
to, weewx-development
Sure! That sounds pretty reasonable.

You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages