Skip to content

Respect host's ShutdownTimeout (e.g. cancellation token) when stopping jobs #42

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

Tolyandre
Copy link
Contributor

We made a graceful stopping in #41. This PR adds respect to ShutdownTimeout by using a cancellation token from IHostedService.StopAsync(). Thus Horarium will abandon awaiting jobs after the timeout. This way feels consistent with .Net core.

@codecov-io
Copy link

Codecov Report

Merging #42 into master will increase coverage by 0.46%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   69.39%   69.85%   +0.46%     
==========================================
  Files          32       32              
  Lines         905      909       +4     
==========================================
+ Hits          628      635       +7     
+ Misses        277      274       -3     
Impacted Files Coverage Δ
...Horarium.AspNetCore/HorariumServerHostedService.cs 0.00% <0.00%> (ø)
src/Horarium/HorariumServer.cs 28.57% <0.00%> (ø)
src/Horarium/Handlers/RunnerJobs.cs 85.33% <100.00%> (ø)
src/Horarium/Handlers/UncompletedTaskList.cs 100.00% <100.00%> (+10.00%) ⬆️

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 8424c6b...1406ccb. Read the comment docs.

@Bobreshovr Bobreshovr merged commit ac23468 into Tinkoff:master Oct 26, 2020
Copy link

@uzser uzser left a comment

Choose a reason for hiding this comment

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

Approved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants