Also posted here: https://stackoverflow.com/questions/50123090/application-process-unusable-after-cant-proceed-with-initialization-of-o
I have a multithreaded application that runs various jobs in threads. One of these jobs goes out to various data sources to query for data. On occasion the mapping process fails and an exception is thrown. That on its own isn't a big deal; my system is designed to compensate for periodically failing jobs. The problem is that that mapping failure seems to be recorded in a global space that then prevents *all* future mapping attempts to be aborted. Even attempts on completely different threads using completely different databases. This renders my entire application effectively broken from that point on. After looking in SQLAlchemy's code, mappers are stored in a _mapper_registry global space variable and once any mapper in the registry errors out, any attempt to configure a new mapper will fail. Mapping failures of this nature may be rare -- and indeed it only rarely happens on the connection I'm having a problem with -- but this complete locking behavior of all future mapping seems very odd to me. If there isn't a way around this I might have no choice but to have my process completely exit when the exception is encountered, even if that means killing other running threads. Any ideas? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
