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

refactor(cron): replace cron implementation. #226

Merged
merged 22 commits into from
Jan 17, 2022
Merged

refactor(cron): replace cron implementation. #226

merged 22 commits into from
Jan 17, 2022

Conversation

Reasno
Copy link
Member

@Reasno Reasno commented Jan 15, 2022

This PR replaces the cron implementation. The API in the new package enforces context passing and error
propagation, and consequently enables better logging, metrics, and tracing support.

BREAKING CHANGE: the new cron package github/DoNewsCode/core/cron is not compatible with github.com/robfig/cron/v3. See examples for how to migrate. The contract.Container API surface is reduced.

BREAKING CHANGE: most Observe() methods now take a time.Duration instead of float64.
This PR replaces the cron implementation.

BREAKING CHANGE: the new cron package github/DoNewsCode/core/cron is not compatible with github.com/robfig/cron/v3. See examples for how to migrate.
# Conflicts:
#	cronopts/jobs/universal.go
This PR replaces the cron implementation.

BREAKING CHANGE: the new cron package github/DoNewsCode/core/cron is not compatible with github.com/robfig/cron/v3. See examples for how to migrate.
@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #226 (160ea54) into master (345e1a3) will increase coverage by 0.58%.
The diff coverage is 95.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
+ Coverage   82.91%   83.50%   +0.58%     
==========================================
  Files         100      102       +2     
  Lines        3618     3794     +176     
==========================================
+ Hits         3000     3168     +168     
- Misses        456      461       +5     
- Partials      162      165       +3     
Impacted Files Coverage Δ
container/container.go 100.00% <ø> (+30.00%) ⬆️
deprecated_cronopts/log.go 100.00% <ø> (ø)
cron/helper.go 60.00% <60.00%> (ø)
cron/metrics.go 76.92% <90.90%> (ø)
serve.go 92.66% <95.55%> (+2.06%) ⬆️
cron/options.go 96.15% <96.15%> (ø)
cron/cron.go 97.84% <97.84%> (ø)
c.go 77.43% <100.00%> (+0.85%) ⬆️
internal/stub/metrics.go 88.88% <100.00%> (+11.96%) ⬆️
observability/metrics.go 100.00% <100.00%> (ø)
... and 3 more

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 345e1a3...160ea54. Read the comment docs.

@Reasno Reasno requested a review from GGXXLL January 16, 2022 01:26
@GGXXLL GGXXLL merged commit fbe5f4f into master Jan 17, 2022
@Reasno Reasno deleted the cron branch January 17, 2022 05:51
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.

2 participants