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

Deprecate most "Event::every*" methods #344

Merged
merged 2 commits into from
Dec 27, 2020
Merged

Deprecate most "Event::every*" methods #344

merged 2 commits into from
Dec 27, 2020

Conversation

PabloKowalczyk
Copy link
Collaborator

Q A
Fixed tickets no

As discussed in #307 most Task::every*() methods are not really "every". Take everyFourtyMinutes for example, expected run dates are: 00:00, 00:40, 01:20, 02:00, but actual dates are: 00:00, 00:40, 01:00, 01:40, so task doesn't run every fourty minutes (same rules applies to "hour", "day" and "moth" calls). To reduce ambigious behavior i decided to deprecate most Task::every*() methods and add/leave only real "every" methods like everyTenMinutes or everyThirtyMinutes.
With this change IDE can autocomplete "new" methods, which is not a case earlier.
Migration path is not complex, use one of "new" methods or provide Cron expression by Task::cron method.
"New" methods:

  • everyMinute
  • everyTwoMinutes
  • everyThreeMinutes
  • everyFourMinutes
  • everyFiveMinutes
  • everyTenMinutes
  • everyFifteenMinutes
  • everyThirtyMinutes
  • everyTwoHours
  • everyThreeHours
  • everyFourHours
  • everySixHours

@PabloKowalczyk PabloKowalczyk added this to the v2.3 milestone Dec 25, 2020
@PabloKowalczyk PabloKowalczyk changed the title Deprecated most "Event::every*" methods Deprecate most "Event::every*" methods Dec 25, 2020
@PabloKowalczyk PabloKowalczyk merged commit 3274820 into lavary:master Dec 27, 2020
@PabloKowalczyk PabloKowalczyk deleted the deprecate-most-every-methods branch December 27, 2020 05:59
@PabloKowalczyk PabloKowalczyk mentioned this pull request Mar 14, 2021
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.

1 participant