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

style: add msg in task.cancel #2416

Merged
merged 10 commits into from Jun 16, 2022
Merged

style: add msg in task.cancel #2416

merged 10 commits into from Jun 16, 2022

Conversation

SaidBySolo
Copy link
Member

@SaidBySolo SaidBySolo commented Mar 25, 2022

close #2325

ref:

sanic/sanic/app.py

Lines 1258 to 1266 in 0309874

if msg:
if sys.version_info >= (3, 9):
args = (msg,)
else: # no cov
raise RuntimeError(
"Cancelling a task with a message is only supported "
"on Python 3.9+."
)
task.cancel(*args)

@SaidBySolo SaidBySolo requested a review from a team as a code owner March 25, 2022 05:15
@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #2416 (539fcbe) into main (49789b7) will decrease coverage by 0.068%.
The diff coverage is 80.000%.

@@              Coverage Diff              @@
##              main     #2416       +/-   ##
=============================================
- Coverage   87.255%   87.186%   -0.069%     
=============================================
  Files           60        60               
  Lines         5061      5065        +4     
  Branches       909       910        +1     
=============================================
  Hits          4416      4416               
- Misses         474       476        +2     
- Partials       171       173        +2     
Impacted Files Coverage Δ
sanic/server/protocols/http_protocol.py 84.090% <80.000%> (-4.005%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49789b7...539fcbe. Read the comment docs.

@SaidBySolo
Copy link
Member Author

If I test locally, everything is fine. I can't reproduce the failure in ci.

@ahopkins ahopkins merged commit 65b53a5 into sanic-org:main Jun 16, 2022
26 of 27 checks passed
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.

Cancel tasks with a message where appropriate
2 participants