File: reap_oracle_dbs.py

package info (click to toggle)
alembic 1.0.0-2~bpo9+2
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 2,088 kB
  • sloc: python: 22,563; makefile: 95; sh: 10
file content (18 lines) | stat: -rw-r--r-- 455 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Drop Oracle databases that are left over from a
multiprocessing test run.

Currently the cx_Oracle driver seems to sometimes not release a
TCP connection even if close() is called, which prevents the provisioning
system from dropping a database in-process.

"""
from alembic.testing import provision
import logging
import sys

logging.basicConfig()
logging.getLogger(provision.__name__).setLevel(logging.INFO)

provision.reap_oracle_dbs(sys.argv[1])