Closed neomantra closed 2 years ago
Merging #37 (bcd0493) into master (8d78d00) will decrease coverage by
1.07%
. The diff coverage is51.72%
.
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
- Coverage 84.45% 83.38% -1.08%
==========================================
Files 6 7 +1
Lines 592 620 +28
==========================================
+ Hits 500 517 +17
- Misses 62 71 +9
- Partials 30 32 +2
Impacted Files | Coverage Δ | |
---|---|---|
quartz/function_job.go | 50.00% <50.00%> (ø) |
|
quartz/job.go | 88.88% <100.00%> (ø) |
|
quartz/scheduler.go | 90.69% <0.00%> (+2.32%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Thanks for merging!
Expand the suite of Jobs to include plain Golang functions, including their closures.
You can create a FunctionJob like so:
The other Jobs either shell out or hit endpoint with cron. It is also useful to invoke Go functions. For example, various periodic cleanup tasks for a service.
This simple,. type-safe implementation requires generic support in Go, available in Go 1.18. Note that the library user doesn't need to deal with generics and types at all.