Statesman currently relies heavily on ActiveRecord::Base, either explicitly or implicitly, when querying database connections. This doesn't play well when we have models or transitions which live on a different database, since it forces us to open a query to the primary connection pool.
This is a series of changes to allow Statesman to use the context it has available for the model or transition class, and make use of the appropriate connection.
Statesman currently relies heavily on
ActiveRecord::Base
, either explicitly or implicitly, when querying database connections. This doesn't play well when we have models or transitions which live on a different database, since it forces us to open a query to the primary connection pool.This is a series of changes to allow Statesman to use the context it has available for the model or transition class, and make use of the appropriate connection.