bell...@gmail.com
unread,May 2, 2024, 11:35:48 AM5/2/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-development
Background:
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