Skip to content

Commit 2bec88d

Browse files
committed
adds logging
1 parent d667474 commit 2bec88d

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

services/web/server/src/simcore_service_webserver/users/_users_repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ async def get_user_fullname(app: web.Application, *, user_id: UserID) -> FullNam
196196
user_id = _parse_as_user(user_id)
197197

198198
async with pass_or_acquire_connection(engine=get_asyncpg_engine(app)) as conn:
199-
result = await conn.stream(
199+
result = await conn.execute(
200200
sa.select(
201201
users.c.first_name,
202202
users.c.last_name,
203203
).where(users.c.id == user_id)
204204
)
205-
user = await result.first()
205+
user = result.first()
206206
if not user:
207207
raise UserNotFoundError(user_id=user_id)
208208

services/web/server/tests/unit/with_dbs/docker-compose-devel.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,20 @@ services:
2020
# - net.ipv4.tcp_keepalive_intvl=600
2121
# - net.ipv4.tcp_keepalive_probes=9
2222
# - net.ipv4.tcp_keepalive_time=600
23-
command: |
24-
postgres
25-
-c tcp_keepalives_idle=600
26-
-c tcp_keepalives_interval=600
27-
-c tcp_keepalives_count=5
23+
command:
24+
- "postgres"
25+
- "-c"
26+
- "tcp_keepalives_idle=600"
27+
- "-c"
28+
- "tcp_keepalives_interval=600"
29+
- "-c"
30+
- "tcp_keepalives_count=5"
31+
- "-c"
32+
- "log_statement=all"
33+
- "-c"
34+
- "log_min_duration_statement=500"
35+
- "-c"
36+
- "log_lock_waits=on"
2837
adminer:
2938
image: adminer:4.8.1
3039
init: true

services/web/server/tests/unit/with_dbs/docker-compose.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ services:
1919
# - net.ipv4.tcp_keepalive_intvl=600
2020
# - net.ipv4.tcp_keepalive_probes=9
2121
# - net.ipv4.tcp_keepalive_time=600
22-
command: postgres -c tcp_keepalives_idle=600 -c tcp_keepalives_interval=600 -c tcp_keepalives_count=5
23-
22+
command:
23+
- "postgres"
24+
- "-c"
25+
- "tcp_keepalives_idle=600"
26+
- "-c"
27+
- "tcp_keepalives_interval=600"
28+
- "-c"
29+
- "tcp_keepalives_count=5"
30+
- "-c"
31+
- "log_lock_waits=on"
2432
redis:
2533
image: "redis:6.2.6@sha256:4bed291aa5efb9f0d77b76ff7d4ab71eee410962965d052552db1fb80576431d"
2634
init: true

0 commit comments

Comments
 (0)