Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise different exception on processing timed out message #28

Merged
merged 7 commits into from
Sep 19, 2022

Conversation

GinTR1k
Copy link
Contributor

@GinTR1k GinTR1k commented Oct 4, 2020

No description provided.

@GinTR1k GinTR1k changed the title raises different exception when trying to process timed out message Raises different exception when trying to process timed out message Oct 4, 2020
@GinTR1k GinTR1k force-pushed the improve-exception-on-processed-message branch 11 times, most recently from 915ada4 to 917de51 Compare October 4, 2020 21:00
@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2020

Codecov Report

Base: 86.75% // Head: 87.51% // Increases project coverage by +0.76% 🎉

Coverage data is based on head (471ba66) compared to base (93d5edb).
Patch coverage: 99.06% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   86.75%   87.51%   +0.76%     
==========================================
  Files          33       33              
  Lines        1963     2019      +56     
  Branches      226      231       +5     
==========================================
+ Hits         1703     1767      +64     
+ Misses        193      186       -7     
+ Partials       67       66       -1     
Impacted Files Coverage Δ
tests/test_read_messages.py 97.14% <98.70%> (+0.21%) ⬆️
ansq/tcp/connection.py 67.08% <100.00%> (+0.63%) ⬆️
ansq/tcp/types/connection.py 85.63% <100.00%> (+2.01%) ⬆️
ansq/tcp/types/message.py 92.72% <100.00%> (+4.26%) ⬆️
tests/test_connection.py 100.00% <100.00%> (+5.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@GinTR1k GinTR1k force-pushed the improve-exception-on-processed-message branch from 917de51 to 0a65c90 Compare October 4, 2020 21:03
return response
async def wrapper(message: "NSQMessage", *args: Any, **kwargs: Any) -> Any:
if message.is_processed:
raise RuntimeWarning(f"Message id={message.id} has already been processed")
Copy link
Collaborator

Choose a reason for hiding this comment

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

While RuntimeWarning is technically an exception, it should not be raised manually in code, because conceptually it belongs to the warnings mechanism. This must be fixed in a following-up PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Tracking issue - #72.

Copy link

@Ivashkaization Ivashkaization left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@atugushev atugushev changed the title Raises different exception when trying to process timed out message Raise different exception on processing timed out message Sep 19, 2022
@atugushev atugushev merged commit efdf6cf into master Sep 19, 2022
@atugushev atugushev deleted the improve-exception-on-processed-message branch September 19, 2022 09:43
@atugushev
Copy link
Collaborator

Thanks @GinTR1k for the improvement and @Ivashkaization for the review!

@atugushev atugushev added this to the 0.2.0 milestone May 30, 2023
@atugushev atugushev added the enhancement New feature or request label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants