Skip to content

Commit

Permalink
WIP: Trying to remove old connpool
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Jan 16, 2025
1 parent b8c870b commit 6f8ab9f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1,423 deletions.
17 changes: 2 additions & 15 deletions edb/server/connpool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os
from .pool import Pool as Pool1Impl, _NaivePool # NoQA
from .pool2 import Pool as Pool2Impl
from .pool2 import Pool

# During the transition period we allow for the pool to be swapped out. The
# current default is to use the old pool, however this will be switched to use
# the new pool once we've fully implemented all required features.
if os.environ.get("EDGEDB_USE_NEW_CONNPOOL", "") == "1":
Pool = Pool2Impl
Pool2 = Pool1Impl
else:
# The two pools have the same effective type shape
Pool = Pool1Impl # type: ignore
Pool2 = Pool2Impl # type: ignore

__all__ = ('Pool', 'Pool2')
__all__ = ('Pool')
Loading

0 comments on commit 6f8ab9f

Please sign in to comment.