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

Wait for crons on shutdown #603

Merged
merged 4 commits into from
Mar 21, 2022
Merged

Wait for crons on shutdown #603

merged 4 commits into from
Mar 21, 2022

Conversation

rowanseymour
Copy link
Contributor

Also simplifies the starting of cron jobs

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #603 (b04560c) into main (cca709e) will increase coverage by 0.40%.
The diff coverage is 91.30%.

@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   61.76%   62.16%   +0.40%     
==========================================
  Files         127      127              
  Lines        8950     8908      -42     
==========================================
+ Hits         5528     5538      +10     
+ Misses       2555     2502      -53     
- Partials      867      868       +1     
Impacted Files Coverage Δ
utils/cron/cron.go 81.81% <84.61%> (-0.41%) ⬇️
core/tasks/campaigns/cron.go 78.46% <100.00%> (+6.63%) ⬆️
core/tasks/expirations/cron.go 60.27% <100.00%> (+8.46%) ⬆️
core/tasks/handler/cron.go 57.77% <100.00%> (+6.79%) ⬆️
core/tasks/incidents/end_incidents.go 64.44% <100.00%> (+7.58%) ⬆️
core/tasks/ivr/cron.go 51.42% <100.00%> (+7.52%) ⬆️
core/tasks/msgs/retries.go 73.33% <100.00%> (+20.95%) ⬆️
core/tasks/schedules/cron.go 59.15% <100.00%> (+5.90%) ⬆️
core/tasks/timeouts/cron.go 58.06% <100.00%> (+9.41%) ⬆️

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 cca709e...b04560c. Read the comment docs.

@@ -108,11 +109,12 @@ func main() {

// handleSignals takes care of trapping quit, interrupt or terminate signals and doing the right thing
func handleSignals(mr *mailroom.Mailroom) {
sigs := make(chan os.Signal)
sigs := make(chan os.Signal, 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

gets rid of linter warning on line below that you should us a buffered channel with signal.Notify

@rowanseymour rowanseymour merged commit a7fc6df into main Mar 21, 2022
@rowanseymour rowanseymour deleted the better_cron branch March 21, 2022 14:47
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.

None yet

1 participant