Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/murfey/server/api/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@
.where(DataCollectionGroup.session_id == session_id)
.where(DataCollectionGroup.tag == dcg_params.tag)
).all():
dcg_murfey[0].atlas = dcg_params.atlas
dcg_murfey[0].sample = dcg_params.sample
dcg_murfey[0].atlas_pixel_size = dcg_params.atlas_pixel_size
dcg_murfey[0].atlas = dcg_params.atlas or dcg_murfey[0].atlas
dcg_murfey[0].sample = dcg_params.sample or dcg_murfey[0].sample
dcg_murfey[0].atlas_pixel_size = (

Check warning on line 105 in src/murfey/server/api/workflow.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/server/api/workflow.py#L103-L105

Added lines #L103 - L105 were not covered by tests
dcg_params.atlas_pixel_size or dcg_murfey[0].atlas_pixel_size
)

if _transport_object:
if dcg_murfey[0].atlas_id is not None:
Expand All @@ -114,6 +116,8 @@
"atlas": dcg_params.atlas,
"sample": dcg_params.sample,
"atlas_pixel_size": dcg_params.atlas_pixel_size,
"dcgid": dcg_murfey[0].id,
"session_id": session_id,
},
)
else:
Expand Down
10 changes: 10 additions & 0 deletions src/murfey/server/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,16 @@
message["sample"],
)
murfey.server._transport_object.transport.ack(header)
if dcg_hooks := entry_points().select(
group="murfey.hooks", name="data_collection_group"
):
try:

Check warning on line 2038 in src/murfey/server/feedback.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/server/feedback.py#L2038

Added line #L2038 was not covered by tests
for hook in dcg_hooks:
hook.load()(message["dcgid"], session_id=message["session_id"])
except Exception:
logger.error(

Check warning on line 2042 in src/murfey/server/feedback.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/server/feedback.py#L2040-L2042

Added lines #L2040 - L2042 were not covered by tests
"Call to data collection group hook failed", exc_info=True
)
return None
elif message["register"] == "data_collection":
logger.debug(
Expand Down