Skip to content

Commit 2c378c5

Browse files
committed
Need to add session ID
1 parent e4144d6 commit 2c378c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/murfey/server/api/instrument.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ class RSyncerInfo(BaseModel):
441441
files_transferred: int
442442
files_counted: int
443443
transferring: bool
444+
session_id: int
444445

445446

446447
@router.get("/instruments/{instrument_name}/sessions/{session_id}/rsyncer_info")
@@ -464,7 +465,7 @@ async def get_rsyncer_info(
464465
) as resp:
465466
data = await resp.json()
466467
combined_data = []
467-
data_source_lookup = {d.source: d for d in data}
468+
data_source_lookup = {d["source"]: d for d in data}
468469
for ri in rsync_instances:
469470
d = data_source_lookup.get(ri.source, {})
470471
combined_data.append(
@@ -479,6 +480,7 @@ async def get_rsyncer_info(
479480
files_transferred=ri.files_transferred,
480481
files_counted=ri.files_counted,
481482
transferring=ri.transferring,
483+
session_id=session_id,
482484
)
483485
)
484486
return combined_data

0 commit comments

Comments
 (0)