just reconnect regardless of whatever before an execution
This commit is contained in:
parent
4fc4b6a018
commit
b2c9c95821
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@ class Database:
|
||||||
)
|
)
|
||||||
|
|
||||||
def init_test_database(self):
|
def init_test_database(self):
|
||||||
|
self.con.reconnect()
|
||||||
cursor = self.con.cursor()
|
cursor = self.con.cursor()
|
||||||
try:
|
try:
|
||||||
cursor.execute("CREATE TABLE discord_link ( admin_id int(10) UNSIGNED NOT NULL, discord_id bigint(20) UNSIGNED NOT NULL, steamid varchar(65) COLLATE utf8mb4_unicode_ci NOT NULL);")
|
cursor.execute("CREATE TABLE discord_link ( admin_id int(10) UNSIGNED NOT NULL, discord_id bigint(20) UNSIGNED NOT NULL, steamid varchar(65) COLLATE utf8mb4_unicode_ci NOT NULL);")
|
||||||
|
@ -29,6 +30,7 @@ class Database:
|
||||||
raise Exception("Error while trying to connect to database.")
|
raise Exception("Error while trying to connect to database.")
|
||||||
|
|
||||||
def create_reserved_slot(self, discord_user, steam_id):
|
def create_reserved_slot(self, discord_user, steam_id):
|
||||||
|
self.con.reconnect()
|
||||||
cursor = self.con.cursor()
|
cursor = self.con.cursor()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue