Skip to content

Conversation

@stephen-riggs
Copy link
Contributor

Modifies the tool to repost failed client posts to the murfey api, by removing the need for zocalo.
Also no longer needs the token to be provided, it takes the security configuration file as an argument and works out the token from that.

Uses some code copied across from cryoem-services, which originates from python-zocalo

@codecov
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 86.20690% with 12 lines in your changes missing coverage. Please review.

Project coverage is 28.07%. Comparing base (3742e0e) to head (b4eab67).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #493      +/-   ##
==========================================
+ Coverage   27.29%   28.07%   +0.78%     
==========================================
  Files          78       78              
  Lines       10212    10494     +282     
  Branches     1362     1467     +105     
==========================================
+ Hits         2787     2946     +159     
- Misses       7330     7434     +104     
- Partials       95      114      +19     

@stephen-riggs stephen-riggs self-assigned this Feb 13, 2025
@stephen-riggs stephen-riggs marked this pull request as ready for review February 13, 2025 12:11
dlqmsg["message"],
headers=clean_header,
)
dlqfile.unlink()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding the function correctly, you're deleting the DLQ message after resubmission. Is it worth implementing flags such as in the cryoemservices implementation of this function to control whether to keep or delete DLQ messages upon resubmission?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main reason we need the tool in murfey is to handle failed API posts.
I've deliberately kept the tool simple, and with limited functionality for safety.
So it will only repost what it purges, and cannot be used to save or modify messages, or post other things to the API.
We could implement more flags, but it would just be duplicating functionality that can be got through the cryoemservices tool.

Copy link
Contributor

@tieneupin tieneupin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions, but looks good otherwise!

@stephen-riggs stephen-riggs merged commit 8823cc2 into main Feb 13, 2025
17 checks passed
@stephen-riggs stephen-riggs deleted the dlq-tool branch February 13, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants