Skip to content

Commit e9bfcc9

Browse files
committed
BUGFIX:
- Maintenance flag was not read correctly on startup.
1 parent 4a1e7d4 commit e9bfcc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/data/impl/serverimpl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ def __post_init__(self):
113113
self._lock = asyncio.Lock()
114114
with self.pool.connection() as conn:
115115
with conn.transaction():
116-
cursor = conn.execute("""
116+
conn.execute("""
117117
INSERT INTO servers (server_name)
118118
VALUES (%s)
119119
ON CONFLICT (server_name) DO NOTHING
120-
RETURNING maintenance
120+
""", (self.name, ))
121+
cursor = conn.execute("""
122+
SELECT maintenance FROM servers WHERE server_name = %s
121123
""", (self.name, ))
122124
row = cursor.fetchone()
123125
if row:

0 commit comments

Comments
 (0)