Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown the Plugin (to free database) #92

Open
mikkoi opened this issue Jan 30, 2017 · 0 comments
Open

Shutdown the Plugin (to free database) #92

mikkoi opened this issue Jan 30, 2017 · 0 comments

Comments

@mikkoi
Copy link

mikkoi commented Jan 30, 2017

My use in testing:
I have PostgreSQL database and I test my Dancer2 API routes by creating a new database instance every time. That way I always get 1) completely fresh database and 2) the newest schema. When the test has been run and assuming there were no errors, the database is deleted. When I start my Dancer2 with Plack::Test, I also run a setup() function to give the database name to Dancer (via runtime config).

When I finish running the test, I cannot delete the database because it is still open and reserved by Dancer2.

I think, what we need, is a way to signal to Database plugin that it must close down the connection and keep it closed. Something like

database->abandon([name]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant