oslo.db/releasenotes/notes/add_facade_started-14f9bc34fac89371.yaml
Mike Bayer 5b36e169ea Add "is_started" flag to enginefacade
Some module reloading scenarios such as that which occurs
within mod_wsgi mean that an existing module-level enginefacade
is already in the "started" state, however initialization
routines from the calling application may still attempt to
call the ``.configure`` method.  Add a new flag is_started
to both _TransactionContextManager and _TransactionFactory so
that calling code can check for this state ahead of time;
additionally, promote the TypeError raised to a specific subclass
enginefacade.AlreadyStartedError to allow for better optimistic
schemes.

Change-Id: I2f5a9e35c2fae0c28b78beef3dcd2c4794362766
References: I704196711d30c1124e713ac31111a8ea6fa2f1ba
2018-10-24 13:45:50 -04:00

9 lines
361 B
YAML

---
features:
- |
Added new ``.is_started`` boolean flag to enginefacade context manager
and factory objects, so that double-configure scenarios can be prevented
by calling code. Additionally, the ``TypeError`` raised when configure
is called after the factory is started is now a specific subclass
``enginefacade.AlreadyStartedError``.