From 4c92bbeae21f3d1cda0cd8e4d57261b104007b34 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sun, 27 Sep 2020 06:10:11 -0700 Subject: [PATCH] wait a sec before deleting --- wowstash/blueprints/auth/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wowstash/blueprints/auth/routes.py b/wowstash/blueprints/auth/routes.py index df7b2af..c8cf5f0 100644 --- a/wowstash/blueprints/auth/routes.py +++ b/wowstash/blueprints/auth/routes.py @@ -1,6 +1,7 @@ from os import kill from flask import request, render_template, session, redirect, url_for, flash from flask_login import login_user, logout_user, current_user, login_required +from time import sleep from wowstash.blueprints.auth import auth_bp from wowstash.forms import Register, Login, Delete from wowstash.models import User @@ -85,6 +86,7 @@ def delete(): if form.validate_on_submit(): docker.stop_container(current_user.wallet_container) send_es({'type': 'stop_container', 'user': current_user.email}) + sleep(1) docker.delete_wallet_data(current_user.id) send_es({'type': 'delete_wallet', 'user': current_user.email}) current_user.clear_wallet_data(reset_password=True, reset_wallet=True)