Releases: sultaniman/every
Releases Β· sultaniman/every
Cookies
SpΓ€tkauf
Updates
This release is small and has incremental improvements
- Update packages,
- Cleanup unused code,
- Add community related papers like contributing, code of conduct,
- Add credo and inch to inspect and analyse code.
β¨π½β¨
Tidyverse
Improvements
- Added code of conduct.
Breaking changes
- Removed deprecated functions
minutes(interval, nil)andhours(interval, nil).
Happy holidays!
π π π
Hello Every!
Improvements
This release has only minor adjustments in documentation and examples.
Also makes return values Process.send_after/3 friendly.
Breaking changes
Now default resolution is in milliseconds so you don't have to manually convert seconds into milliseconds.
# Lets say we want to trigger our task every 5 minutes and current time is 12:02
# so next calls will be at 12:05, 12:10 ... 12:55 ...
Process.send_after(self(), :work, Every.minutes(5))
# If we want to trigger every minute
Process.send_after(self(), :work, Every.minute())
# If we want to trigger every hour
Process.send_after(self(), :work, Every.hour())
# If we want to trigger every 2 hours
Process.send_after(self(), :work, Every.hours(2))
# If we want to trigger every day
Process.send_after(self(), :work, Every.day())ππ π
Hacktoberfest!
Thanks for @janpieper for awesome refactoring and bug fixing!
Improvements
- Drop
use Timexto avoid unnecessary third party module aliasing, - Clean up
@moduledocand@doc, - Use Timex for calculations instead of doing it manually,
- Fix a bug with calculating the interval in
hour/1andhours/2, - Parse datetime in
setupand pass ascontextinto tests to parse only once, - Test
hours/2instead ofhour/1in doctest forhours/2π.
Deprecations
minutes(interval, nil)andhours(interval, nil)are deprecated and using them will log warnings.
#hacktoberfest
π π° π
Every.day
Improvements
- Documentation fixes,
- Credo as a linter,
- Hound to run linter.
Features
Now you can calculate intervals until next day using Every.day/1
Process.send_after(self(), :work, Every.day() * 1000)β¨π°β¨
Catch bugs
This version is bug fix for wrong hour interval calculation.
πππ
Every time do ... X
This is initial release published on hex.pm.
β¨π°β¨
Initial release
β¨π°β¨