From 8cd3605d48bffdad062d607ff28be9fa9ef7b896 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Wed, 5 Jun 2024 17:47:40 +0200 Subject: [PATCH] datbases: wait 1.5 second assign user to db after create --- orchestra/contrib/databases/backends.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/orchestra/contrib/databases/backends.py b/orchestra/contrib/databases/backends.py index 304b692c..298830f3 100644 --- a/orchestra/contrib/databases/backends.py +++ b/orchestra/contrib/databases/backends.py @@ -29,6 +29,9 @@ class MySQLController(ServiceController): # Create database and re-set permissions mysql -e 'CREATE DATABASE `%(database)s`;' || true mysql mysql -e 'DELETE FROM db WHERE db = "%(database)s";'\ + + # wait to create user + sleep 1.5 """) % context ) for user in database.users.all():