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

feat: remove Job interface #15

Merged
merged 1 commit into from
Nov 11, 2023
Merged

Conversation

janrnc
Copy link
Member

@janrnc janrnc commented Oct 13, 2023

  • Removed Job interface and used simple func() instead. Access to external variables or struct properties is still possible using closures.
  • Removed cron.AddFunc(). cron.AddJob() renamed to cron.Add() , taking in this new func() job.
  • Removed Job and WrappedJob from Entry which made it possible to inspect the scheduled Job struct. Now that jobs are func()s, this is no longer relevant. Job struct management is up to the user who's free to map them to the cron IDs in the preferred way.

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #15 (d56396c) into master (6e9e3a0) will decrease coverage by 0.94%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
- Coverage   96.66%   95.73%   -0.94%     
==========================================
  Files           7        7              
  Lines         660      656       -4     
==========================================
- Hits          638      628      -10     
- Misses         18       24       +6     
  Partials        4        4              
Files Coverage Δ
chain.go 93.02% <100.00%> (ø)
cron.go 92.39% <100.00%> (-3.36%) ⬇️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@janrnc janrnc mentioned this pull request Oct 13, 2023
@janrnc janrnc linked an issue Oct 13, 2023 that may be closed by this pull request
@janrnc janrnc force-pushed the feat/remove-job-interface branch from fcf9e70 to 83de230 Compare November 11, 2023 10:39
@janrnc janrnc force-pushed the feat/remove-job-interface branch from 83de230 to d56396c Compare November 11, 2023 10:42
@janrnc janrnc merged commit 13f4603 into gdgvda:master Nov 11, 2023
4 of 5 checks passed
Copy link

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@janrnc janrnc deleted the feat/remove-job-interface branch September 10, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove Job interface
1 participant