From 82ad5ad44186f59d63b058c50fcd07d874eb9e77 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 26 Mar 2022 23:04:40 -0500 Subject: [PATCH] Configure DB connections for CORE trans archive on app startup --- rattail_corepos/config.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rattail_corepos/config.py b/rattail_corepos/config.py index 7084e63..f9d3852 100644 --- a/rattail_corepos/config.py +++ b/rattail_corepos/config.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2021 Lance Edgar +# Copyright © 2010-2022 Lance Edgar # # This file is part of Rattail. # @@ -56,6 +56,13 @@ class RattailCOREPOSExtension(ConfigExtension): config.coretrans_engines = engines config.coretrans_engine = engines.get('default') + # office_trans_archive + from corepos.db.office_trans_archive import Session + engines = get_engines(config, section='corepos.db.office_trans_archive') + config.core_office_trans_archive_engines = engines + config.core_office_trans_archive_engine = engines.get('default') + Session.configure(bind=config.core_office_trans_archive_engine) + # lane_op from corepos.db.lane_op import Session engines = get_engines(config, section='corepos.db.lane_op')