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
add asyncio.CancelledError to serialize_decorator #1015
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
=======================================
Coverage 82.76% 82.77%
=======================================
Files 224 224
Lines 13128 13129 +1
=======================================
+ Hits 10866 10867 +1
Misses 2262 2262 ☔ View full report in Codecov by Sentry. |
@@ -623,7 +624,7 @@ async def wrapper(self, *args, **kwargs): | |||
try: | |||
result = await func(self, *args, **kwargs) | |||
return result | |||
except KeyboardInterrupt: | |||
except (asyncio.CancelledError, KeyboardInterrupt): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@better629 could you take a look at this?
@geohotstan use code before pr, do the
use the pr, do the
all of the both generate a file I seems that you wrote a |
here is the code from
maybe it's because my |
@geohotstan maybe, you can ref to |
while investigating issue #1013 I tried
ctrl + c
to start serializing for a deserialize run, butTeam.serialize
was not being triggered.the traceback looks something like
where the
KeyboardInterrupt
was triggered insideasyncio.exceptions.CancelledError
.asyncio.exceptions.CancelledError
was also not being caught byException
because it inherits fromBaseException
so
ctrl + c
ends the program without serializing.not sure if this is intended or not since I'm very new to this repo
for the fix, I kept KeyboardInterrupt in in case non-async code gets added.